Loading

Weekly Sales Report using Crystal Reports

Submitted by: 
Visitors have accessed this post 17955 times.


The following source code will teach you on how to create a “Weekly Sales Report” using Crystal Reports.

The most important part of this project is the use of SQL Statement. Here’s the statement that create a weekly sales report.

  1. SELECT TOP (100) PERCENT CONVERT(VARCHAR, DATEADD(WEEK, DATEDIFF(WEEK, CONVERT(DATETIME, '1900-01-01 00:00:00', 102), DATE), CONVERT(DATETIME,
  2. '1900-01-01 00:00:00', 102)), 101) AS DATE, SUM(Amount) AS Amount
  3. FROM dbo.Sales
  4. GROUP BY CONVERT(VARCHAR, DATEADD(WEEK, DATEDIFF(WEEK, CONVERT(DATETIME, '1900-01-01 00:00:00', 102), DATE), CONVERT(DATETIME, '1900-01-01 00:00:00', 102)),
  5. 101)
  6. ORDER BY DATE

This statement can be found on the SQL Server database that is included in the zip file.

You need to change the connection string just in case you’re using a different name like the one I used here - “LOCALHOST\SQLEXPRESS”.

Follow the tutorial on “How to Change Connection String of VB.NET Project at Design Time

Additionally, you will need to change the “ServerName” that is found under frmReports form as follows:

myConnectionInfo.ServerName = "LOCALHOST\SQLEXPRESS"




Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Hi Sir I need INVENTORY SYSTEM (sales)in visual basic 6.0 connecting to database Ms Access for thesis. I want you to cooperate with me in this project..I hope you will post for me to download it..

Thanks
jan

Thanks you very much

Thank You Very Much

Sir can you send me an example of collection system you can send it on ladyinmyheart@yahoo.com.. Thanks ..God Bless

Hi sir need your help...

I have a problem for reservation in my project.. the problem is if the Guest 1 want to reserve the room in 3 hrs
and the next Guest2 want to reserve the room in the same room..so i would like my system to do the reservation for have no conflict the time for my two Guest..

Thank you sir.. just sent you answer to my email account usonjosephrey@yahoo.com

Add new comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
To prevent automated spam submissions leave this field empty.

Filtered HTML

  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.