Weekly Sales Report using Crystal Reports
- SELECT TOP (100) PERCENT 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)), 101) AS DATE, SUM(Amount) AS Amount
- FROM dbo.Sales
- 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)),
- 101)
- 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
Collection System
reservation in room with 3 hrs
Add new comment
- Add new comment
- 819 views