Are you writing the SQL as a command in Crystal? Or are you joining tables in Crystal and want to filter on user entered values for start and end dates?
If you're using tables, just create two parameters in the Field Explorer - one for start date and the other for end date. Then go to the Select Expert, select the date field you want to filter on, then select "Between", and finally select the {?Start Date} and {?End Date} parameters that you created.
If you're entering a SQL select statement in a command, do the following.
1. DO NOT create the parameters in the main report!!!! If you have already, delete them!
2. Open the Command Editor.
3. Create your Start Date and End Date parameters in the Command Editor.
4. Place your cursor in the query at the place where you want the Start Date parameter to be used then double-click on the Start Date parameter you just created. Do the same for the End Date.
5. Close the Command Editor. Crystal will ask you for values for the parameters so that it can validate the data. Enter them and click on OK.
NOTE: If you create a parameter in the Command Editor and do not use it, it will not be saved!
Parameters that are created in the Command Editor have a slightly different internal structure than those created in the report. The Command Editor parameters can be used elsewhere in the report, but the report-based parameters cannot be used in a command.
-Dell
A computer only does what you actually told it to do - not what you thought you told it to do.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.