Report Parameters

Report parameters are necessary in order to use data sets fast and easily in a report. Otherwise the default parameters must be changed in the data set settings each time when generating a new report. You can easily replace the report parameters that are queried before displaying a report.

Create a Report Parameter

The following context menu can be displayed with a right-click on the Report Parameters in the Data Explorer:

Figure 1. The New Parameter Option

Click on the New Parameter to open the following window where you can specify a name, a data type and a default parameter etc.:

Figure 2. The New Parameter Window

EXAMPLE- A REPORT PARAMETER FOR THE START & END TIME PARAMETERS OF THE FUNCTION DPGETPERIOD

The BIRT tool queries dates and time as strings by default. You can, however, change the data type for dates and time in the output columns (see chapter alertGetPeriod).

Name the parameter (e.g. StartTime) and define the default value. For a report parameter linked with the StartTime parameter of the function dpGetPeriod, the configuration looks as follows:

Figure 3. A New Parameter - StartTime
Figure 4. A New Parameter - EndTime

EXAMPLE - REPORT PARAMETER FOR THE DPNAME PARAMETER OF THE FUNCTION DPGETPERIOD

Name the parameter (e.g. Datapoint) and specify the default value. For a report parameter linked with the dpName parameter of the function dpGetPeriod, the configuration looks as follows:

Figure 5. A New Parameter - Datapoint

Linking the parameters

In order to link the data set parameters with the report parameters, proceed as follows:

Open the Edit Data Set menu of the appropriate data set (e.g. double click on the data set dpGetPeriod) and click on the menu item Parameters.

Figure 6. Edit Parameters for the function dpGetPeriod

Select the appropriate parameter and click on the Edit button to open the following window:

Figure 7. The Parameter "startTime"

You can select the previously created report parameter from the Linked To Report Parameter combo box. After linking all parameters (in this example with the report parameters StartTime, EndTime and Datapoint), the overview should look as follows:

Figure 8. Linked Parameters

If you open the report now (see also View report), you can edit the parameters before viewing the report.

Figure 9. The BIRT Report Viewer, Parameters