Enabling the User to Filter Data
To enable users to filter database data, complete the following tasks in the recommended order. For detailed information about these tasks, see the corresponding topics later in this section.
How to create a basic report parameter
Figure 11-1 New Parameter
1 In Name, type a name for the parameter. It is good practice to use a prefix, such as RP, in the name to help distinguish report parameters from other parameter types, such as data set parameters. For example, a report parameter used to filter on a quantityinstock field might be named RP_quantityinstock. The value you specify in Name appears as the prompt to the report user if you do not specify a value for the next property, Prompt text. Rather than specify only a Name value for the parameter, you should use a technically descriptive value in Name, and provide a user-friendly value in Prompt text.How to insert a parameter marker in the SQL query
This procedure assumes that you already created a data set.
Figure 11-2 shows an example of a query with two parameter markers.Figure 11-2 Query with two parameter markersHow to define a data set parameter
This procedure assumes that you already inserted a parameter marker in the SQL query.
4 In Edit Parameter, specify the following information:Figure 11-3 shows an example of a data set parameter definition where the data set parameter, DSP_quantityinstock, is linked to a report parameter, RP_quantityinstock.Figure 11-3 Data set parameter definition
5 Repeat steps 3 and 4 to define additional data set parameters for any other parameter markers in the SQL query.Enter Parameters displays all the report parameters you created. Figure 11-4 shows example report parameters, RP_quantityinstock and RP_productvendor. The parameter names appear because values were not supplied for the Prompt text property.Figure 11-4 Enter ParametersIf you completed all the tasks that were described earlier in this section, the WHERE clause of the query incorporates the specified values, and the report displays the rows that match the WHERE clause.
(c) Copyright Actuate Corporation 2013 |