It is often desirable to allow the user to customize certain aspects of report display. For example, the user might want to view only records that satisfy a specific filter condition (e.g., ‘State’ is one of NJ, MD, NY), or they may wish to hide certain report elements and display others.
To provide users with this kind of control, you can define report parameters. Parameters are variables whose values are specified when the report is generated. The following sections explain how to define parameters, and how to prompt the user for their values.
Parameter values can also by set by script, drill-down report, or JSP/HTTP request.
To define report parameters within Report Designer, follow the steps below:
Parameters specified for a query condition or data binding condition are italicized in the Parameters tab. You can modify a query parameter’s default value and type through the Parameters tab. Query parameters can be used in the query selection conditions. A parameter can be either based on a subquery, or get its value from the end user at runtime. If a user parameter is used in a query, the application that performs the query needs to collect the parameter values before the query can be executed.
Multiple queries may have parameters with the same name. In this case, you can specify whether parameters sharing a name should be treated as the same parameter. To treat them as the same parameter (and prompt the user only once) select ‘Preferences’ from the Tools menu, click the Misc tab, and enable the ‘Parameter Name Unique’ option (default).
If query or report parameters are defined for a report (see Parameterization above), then a default parameter screen opens when the user first launches the report. This screen prompts the user for all of the parameters which have the ‘Prompt User’ option enabled. (The prompts are displayed as a dialog box when the report is previewed in Designer.) You can create custom parameter prompting by designing a form using Designer’s form elements. Unlike the default parameter prompting, the form you design will appear as a regular report in the report viewer, and will be replaced by the new report when the form is submitted.
When you prompt the user for a series of related parameters, it is often desirable to guide the user through these choices in a certain order. This is called parameter staging. This technique allows you to constrain the options presented to the user at each stage so that only compatible parameter combinations can be selected.
For example, consider a Parameter Sheet that has two menus, one for ‘State’ and one for ‘City’. Initially, you want only the ‘State’ menu to be enabled, so that the user is forced to select a state first. After the user selects a state, you want to then enable the ‘City’ menu, but restrict its values to those cities that fall within with the selected state.
There are therefore several aspects to parameter staging, as described in the following sections:
InetSoft Technology Corp.
InetSoft Technology Corp.