Writing SQL Queries to Define Report Parameters

More advanced Crystal Reports users can write custom SQL queries to define reports, with WHERE clauses that are evaluated and populated with data based on parameters that you specify. Many of the Report Server reports are defined this way. Open the reportconfig.xml file located in the \vocera\reports folder to see how Report Server parameters are specified.

For example, the following SQL command has a WHERE clause that references a report parameter named DateRange_Clause:

Figure 1. SQL query with a WHERE clause
SELECT TxDate, BadgeMacAddr, RecStatus, Score, Recognized 
from RecResults WHERE {DateRange_Clause}

In this example, {DateRange_Clause} is populated by creating two report parameters, which must also be specified in the customconfig.xml file: