Report Parameters

 

The report parameters allow for the parameterization of reports; i.e. the result of the output can be influenced. This allows e.g. a date range to be selected or only certain invoice numbers to be printed.

 

This functionality can also be used to create drill-down reports. For more information, see chapter Drilldown Reports (Increase Detail Level)

Parameters can be defined via Project > Report Parameters.

 

Tip: The availability of this chart depends on the application.

 

Example:  Filtering a report according to category and date in the preview.

To do so, proceed as follows:

1.  What we have is product statistics spanning multiple product groups and years:

image168_256

Figure 9.6: Sample-Report "Different chart types"

2.  Now add the parameters at Project > Report Parameters. Give distinctive names, e.g. "Categories". The "@" character is automatically appended to the front of the name. For "Available Values", select "From Data Source" and the data source "Categories" with the field "CategoryID".

 

image168_257

Figure 9.7: List of Report Parameters - From Data Source

3.  For the remaining report parameters "StartDate" and "EndDate", select "Manual Input" for "Available Values". Choose "Date" for "Type" and "Control Type" and give them a distinctive name, e.g. "StartDate" and "EndDate".

 

image168_258

Figure 9.8: List of Report Parameters - Manual Input

4.  The parameters are now available in the variable/field list.

image168_259

Figure 9.9: Parameters in the variable/field list.

5.  Under the property "Filter" in the chart object, now define the corresponding formula for the constraints on the data.

Pay attention to the notes in section 7.2 Filter.

 

image168_260

Figure 9.10: Report Parameters in the Variables-/Field-List and Formula for the Filter

6.  When printing to preview, the parameters can then be configured as desired - the report will be filtered according to categories and date:

image168_261

Figure 9.11: Filtered Report

7.  If you are not printing to preview, but instead e.g. to a PDF file, the parameter selection will appear as a dialog before printing.

image168_262

Figure 9.12: Report Parameter Selection in the export

8.  You can now define yet another parameter — in the example above e.g. a "Products" parameter that is dependent on the selection in "Categories". Select the corresponding parameter via the property "Depending on".

image168_263

Figure 9.13: Definition of a dependent Report Parameter

9.  After doing so, for the second parameter "Products", only those values that also match the selected first parameter will be available. In this example, it is only the beverages that are shown:

image168_264

Figure 9.14: Dependent Report Parameter