User Parameters in Template Reports

Parameters allow you to modify a report to essentially allow a "placeholder" for a commonly used query argument.  This is supplied to the user during report generation for ease of use.

Step-by-step guide

From the Detail Report view, it is possible to use the following function in any filterable property on the Configure Filters tab.

 

  1. View the details of your report by clicking on the 

    button from the Report Manager.

  2. Once the report definition loads, click on the 

     tab.  Add the property you would like to filter on from the list of available properties on the left.

  3. Select the desired Operation from the drop down.  

  4. In the Filter Value you will enter the following function:  param("name","default value","label")

    1. Both the default value and label are optional.  The name must be unique within the query.  You can include a param on any type of operation and have as many as necessary.  You can have multiple param's on a single filter (if appropriate, like on a "between" operation).  If a default value is not provided, then the parameter will default to "null", which has the effect of ignoring the filter.  The label is the value shown to the user in the Report Generation UI.

 

Examples

Boolean (True/False)

  • Selected property: Active

  • Operation:  One of

  • Filter value: param("active",,"Active only? (true/false)")

This is how it will look in the Configure Filters UI:

 

Adding the above parameter will give you the following user parameter on the Generate Report popup:

 

Between

Here we'll provide a default using the date shortcuts available.  

  • Selected property: Date

  • Operation: Between

  • Filter value: param("startDate","m","Transaction Start Date"),param("endDate","h","Transaction End Date")

This is how it will look in the Configure Filters UI:

Adding the above parameters will give you the Transaction Start Date and Transaction Stop Date user parameters on the Generate Report popup:

 

Related articles

 

 

Â