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

Selection Formula

Status
Not open for further replies.
Mar 19, 2003
57
US
Below, I added the selection criteria to the "selection formula" in Crystal Report 9. This selection formula is using crystal functions, which slows performance. I had to add the "date" function because the acdgroupsstats.d_time field is a string datatype. Is there an alternative selection criteria formula I can use to pass as much SQL to the the backend (Informix 7)?

date({acdgroupstats.d_time}) >= currentdate - 1 and date({acdgroupstats.d_time}) < currentdate

 
Just add a SQL Expression field to the report.
The SQL expression will have the Informix SQl syntax for the date command(Sorry can't help there).

You can add a SQL expression for the Field Explorer box, just below the Formulae fields.
Then the formulae workshop window will pop up where you can enter the sql for Informix.

The Function window will only have a limited number of functions shown, but any valid function that Informaix knows can be used.

I've done this with CR8.5 and SQL server and it make a big difference to performance sometimes.

Fred
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top