---
title: "Report Parameters"
canonical: "https://docs.rubiconwater.com/space/RptNC/1979842573/Report%20Parameters"
format: markdown
---
> Macro (toc)

Report parameters are values that you can provide to a report before it is run to control the scope of the report. For example, a date parameter can specify the reporting day.

There are two ways that parameters are added to reports:

- You can specify your own parameters. These can be used to provide values in text and headings, and as query parameters in SQL Query paragraphs.
- Some report paragraph types have built-in parameters that are added automatically when you include one of these paragraphs in your report. For example, an Object Attribute Table paragraph has an Area/Group parameter.

# How are parameters used?

- You can substitute the value of any parameter in report text including headers, footers and table column headings. To insert a parameter value, enclose the parameter name in carets. The value returned in a text paragraph is a descriptive string. See <u>[Report Parameter Data Types](https://rubiconwater.atlassian.net/wiki/spaces/RptNC/pages/1979842573/Report+Parameters#Report-Parameter-Data-Types)</u> for details of what is returned for each type of parameter.
  **Example:** ^myParameterName^
- You can substitute the value of any parameter in a SQL query in a SQL Query Table paragraph. For attribute types, objects and tags, the value substituted is the primary key. For boolean parameters the value returned is either the strings "Y" or "N" or a null value.

> ℹ️ **Note**
> ℹ️ 
> ℹ️ Check the report Properties screen for the parameter name. The label used in the Report Runtime Parameters field is the parameter description, not the name.

# Viewing parameter details

In the Report Editor, view the details of parameters by opening a report and clicking **Properties**.

In report output, print the parameter details by including a Parameter Paragraph.

In the Report Scheduler, parameter values for the selected report are listed on the Parameters tab. This is useful if you are running the same report but with different parameters.

**See Also:**

- <u>[Report Parameter Data Types](https://rubiconwater.atlassian.net/wiki/spaces/RptNC/pages/1979842573/Report+Parameters#Report-Parameter-Data-Types)</u>
- <u>[Adding a Report Parameter](https://rubiconwater.atlassian.net/wiki/spaces/RptNC/pages/1979842573/Report+Parameters#Adding-a-Report-Parameter)</u>

# Adding a Report Parameter

**Step 1**

Open your report and click the **Report Properties** icon to open the Report Properties screen.

**Step 2**

Beside the *Parameters* field, click **Add** to open the Insert Parameter screen.

**Step 3**

Set the following properties:

| **Property** | **Description** |
| --- | --- |
| Name | Enter a parameter name that is unique within this report. Use the parameter name when you are substituting the parameter in text or in a SQL query. |
| Description | Enter a label for the parameter that will appear in the report interface. |
| Type | Choose a parameter data type. See <u>[Report Parameter Data Types](https://rubiconwater.atlassian.net/wiki/spaces/RptNC/pages/1979842573/Report+Parameters#Report-Parameter-Data-Types)</u>  for more information about data types.<br>**Specifying a type**<br>If you choose an Object or an Attribute parameter, you will also be prompted to choose which object or attribute types can be chosen. The choice provided to the user will be restricted to the types you have specified. For example, if you choose the object type Area, the user can only choose an object of that type (or one of its subtypes).<br>Note that you can choose more than one type or leave the type unspecified in which case the user can choose from any type. |
| Nullable | Select this checkbox to make setting a parameter value optional. If you are using the parameter in a SQL query, make sure that you cater for the possibility that it will have a null value. If you use a null parameter in text, the value will be blank. |
| Save value | Select this checkbox if you want the report to store the value set for the parameter in the Report Editor for use as a default value. |
| Use run-time | This option is only available for Date or DateTime parameters. Select this checkbox if you want the value of this parameter to be set by the Report Scheduler. If this option is set, the parameter value is set to the time when the report is run. |

**Step 4**

Click **OK** to save your changes.

# Using Historical DataSources

You can choose to use data from an historical dataset as your parameter type.

Historical datasets are archived copies of your database for previous periods.  For example, you may choose to archive a copy of your database at the end of each season. If you select a historical datasource as your data type the report data will be drawn from this rather than from your current database.

Bear in mind that a report that works in your current database may not work with a historical datasource.

- The application data structure may change over time,
- You may have chosen to discard some of your data when the database was archived.

# Report Parameter Data Types

These are the types of parameter that you can add to a report:

| **Type** | **What does the end user see?** | **Parameter details** |
| --- | --- | --- |
| Boolean | Displays a chooser to select Yes or No or no value. | - In a SQL query, a boolean parameter returns the strings "Y" or "N" or a null value
- In report text, a boolean parameter returns the strings "Yes" or "No" or an empty string |
| Integer | A field for a whole number value. | Data is verified when it is entered. Floating point numbers are truncated to an integer. |
| Double | A field for a number with a decimal point. |  |
| String | A field for entering text |  |
| Date | Displays a date picker to select a date |  |
| DateTime | Displays a date picker with a time field. |  |
| Object | Displays an Object Chooser | - In a SQL query, an object parameter will return the OBJECT_NO
- In report text an object parameter will return the OBJECT_NAME |
| Tag | Displays a Tag chooser. | - In a SQL query, a tag parameter will return the TAG_ID
- In report text a tag parameter will return the TAG_DESC |
| Attribute Type | Displays a drop-down control where the report user can pick from a specified list of attribute types. | - In a SQL query, an attribute type parameter will return the ATTRIBUTE_TYPE
- In report text a tag parameter will return the ATTRIBUTE_LABEL |
| Historical Datasource | Displays a drop-down control where the report user can pick from the available historical data sets. | See [https://rubiconwater.atlassian.net/wiki/spaces/RptNC/pages/1979842573/Report+Parameters#Using-Historical-DataSources](https://rubiconwater.atlassian.net/wiki/spaces/RptNC/pages/1979842573/Report+Parameters#Using-Historical-DataSources) for more details. |

---