Data Dynamics Reports Online Help
Parameters
See Also Support Forum
User Guide > Creating Reports > Building Reports > Interactive Reports > Parameters

Glossary Item Box

You can use parameters to filter the data displayed in reports. You can either prompt users for parameters so that they control the output, or supply the parameters behind the scenes. You can also pass values from the main report to a subreport's parameters to keep data synchronized. 

Each parameter must be entered in three places: the Query page of the DataSet smart panel, the Parameters page of the DataSet smart panel, and the Report Parameters smart panel.

Query Parameters (DataSet smart panel Query page)

In your query, use the syntax specific to your data source type to create a parameter.

For example, with an OLEDB data source like the included sample Reels.mdb, to add a multi-value Movie Rating parameter to a query on the Movie table, use syntax like the following:

SELECT * FROM Movie WHERE MPAA IN (?)

A query parameter can get its value from the Report Parameters collection (entered by the user or from a value you supply), a field in another dataset, or an expression.

To pass a Report Parameter into the parameter in your query, select the Parameters page of the DataSet smart panel.

Enter the parameter name, and supply a value like:

=Parameters!MPAA.Value

To populate the list of fields and close the smart panel, click the Accept button in the lower right corner.

Report Parameters Smart Panel (Report Menu)

From the Report menu, select Report Parameters to open the smart panel. The Add button allows you to add parameters to the list.

Options in this smart panel allow you to control how and whether a user interface is presented to your users for each parameter. Each Report Parameter in the collection must have a unique name, and the name must match the name you call in the Parameters page of the Dataset smart panel. In the case of the example above, the name is MPAA.

You can also control the data type, the text used to prompt the user, whether to allow null, blank, or multiple values, and whether to hide the user interface on the General page. The data type of the parameter must match the data type of the field that it filters.

Select the Value icon below the list of parameters to select a default value and populate a list of available values from which users can choose. Use a separate dataset to populate this list.

To run the report without prompting the user, do not supply prompt text and instead select the Hidden check box. In this case, you must provide a default value.

Note: If you hide the user interface and do not provide a default value, the report will not run.

Parameter values are collected in the order they appear in the Report Parameters collection. You can change the order using the arrows in the Report Parameters smart panel. This order can only be affected by the existence of any cascading requirements between the parameters.

See Also

©2010. GrapeCity, inc. All Rights Reserved.