Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL command for crystal report

Status
Not open for further replies.

makk07

Programmer
Aug 22, 2007
24
US
Hi Everyone,

How to write a SQL command for a crystal report for retrieving records only for last 7 days from a SQL Server database.

I am using crystal reports XI.

Thanks in advance for help
mak
 
Mak,
You are going to have to provide us a lot more information if we are to be able to help you!

Have you written anything yet? If so post it. That would be a good place to start.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
I also suggest posting your question in one of the Crystal Report forums. Not all SQL Server TSQL commands work in Crystal Reports.

Personally, I would create a stored procedure in SQL Server that has the number of days as a parameter. Then run the query from Crystal Reports inputting the number of days you need.

It's been a while since I used Crystal Reports, so again you might get better help in the Crystal Reports forums.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top