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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

record selection in CR 8 1

Status
Not open for further replies.

Dshoaf

Programmer
Dec 8, 2000
14
US
I am using SQL server 7.0 and crystal reports 8. In my database I have companies with multiple employees. Each employee record may have multiple account records. (Three tables, two of which have foreign keys.) I have a view with the three tables joined. I would like to use Crystal reports to view a report for every account record less than a given date. (which I am adding in the record selection formula.) It does not matter what date I put in the record selection formula, the report displays every record. If I use a different category, like 'amount due', I can select all the records with an amount greater than a given value. Does anyone have any ideas what I'm doing wrong? The selection formula I am using is as follows:

{DueDate}>cdate(05/01/2001)

Thanks,
Dave
 
Dave: The cdate() function takes as its arguments Year, Month and then Day so the example you provided is looking for all dates greater than the year 5!

The correct formula should read:

{DueDate}<=cdate(2001,1,5)

Try this David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
David,

Thank you. That makes sense. (According to the help file that I have, CDate will take any date/time value or string, but apparently I misjudged what that meant.)

Thanks,
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top