OrderStream has the ability to display the selected report criteria on any custom report. Complete the following steps to add the selected report criteria to one of your custom reports.
Note: This functionality has been available since January 28th, 2008 and requires an updated reports dll. If wish to make sure of this functionality and your reports dll was created prior to January 28, 2008, please contact Seradex Customer Care by browsing to www.seradex.com/techsupport to request to have your reports dll updated.
1. | The displaying of the report criteria works in a similar fashion as displaying the company header or footer; it is controlled via the reports database. Before proceeding, verify the “Reports” table of your reports database has a Boolean field called DisplayReportCriteria. |
For each custom report you want to display criteria, the first step is to set the DisplayReportCriteria Flag to True for the report record.
2. | Create a view in your database. In order to create the subreport, you need a view that defines the fields used on the report. Use the following SQL statement and save the view, giving it a meaningful name such as qryDisplayReportDialog so you can easily locate the view when required. |
SELECT Label AS ControlLabel, MainQueryField AS ValueFrom, MainQueryField AS ValueTo
FROM ReportsDialogSetup
ORDER BY ControlOrder
Remember this view is only to create the fields in the report. OrderStream will take whatever data is selected on the report dialog form,create a temp table, and push the data onto the report. This means the criteria displayed will match exactly what the user selected. Any dialog option that is not selected will NOT be displayed on the report.
3. | Now that you have the saved view it is time to create the subreport in your crystal report. You first create a subreport called crReportCriteria. This subreport name is required for proper functionality. Select the view you created earlier as the data source. Add the three fields to the report. ControlLabel is the label on the dialog form and is controlled in your ReportsDialogSetup table. The value from is simply the from value in the drop down and the ValueTo is the value in the to column. |
4. | Now you should be able to see criteria on your report when you print it from Seradex OrderStream. You will not see anything when you preview in the report designer. |
|