Parameters
This topic applies to the Admin Console > Data > Parameters settings.
Parameters are used throughout the Exago application to store values. Although parameters can be created and given a default value in the Admin Console, parameters are designed to be set at runtime through the API.
Parameters can be used to:
- Pass values to Web Services, .NET Assemblies, or custom SQL Data Objects.
Parameter values are passed in the order in which they are listed in a data object. It is critical to ensure that the order is correct. See Data Objects.
- Set tenant values to assure security in a multi-tenant environment. See Data Objects.
- Pass values into cells and formulas of a report. To display a non-hidden parameter in a cell type @nameOfTheParameter@.
- Pass values into custom functions. See Custom Functions.
- Create a custom dropdown list of values for user selection on a report prompt.
Create, Edit, Delete Parameters
All existing parameters are listed in the Admin Console under Data. All the parameters that are added or edited will be displayed in a tab entitled Parameters.
- To add a new parameter click Parameters in the Main Menu and either:
- click the Add icon at the top of the main menu
- right-click and select Add from the context menu
- To edit a parameter either:
- double click it
- select it and click the Edit icon at the top of the main menu
- right-click it and select Edit from the context menu
- To delete a parameter either:
- select it and click the Delete icon at the top of the main menu
- right-click it and select Delete from the context menu
- To save changes and new parameters click the Apply or Okay buttons.
Currently, the prompt window will not appear when drilling down into a child report that contains prompting parameters. However, this can be partially bypassed by adding the prompting parameter in a hidden cell on the parent report so that the user will be prompted at execution for the parameter value.
Parameter Properties
Each Parameter has the following properties:
Name
A name for the parameter. Prompting parameters are sorted alphabetically by name unless otherwise specified or unless there are dropdown parameters with dependencies.
The following characters are not allowed: @ , . { } [ ]
The following names are reserved by the application: filter, email, userId, companyId, reportName, reportFullName, pageNumber, data_label, data_value, series_label, bubble_size, bubble_value, batch_x
(where x can be any string of characters).
Parameter names are case sensitive.
Type
The parameter data type. The following types are available:
Select date for DateTimes and string for functions.
- string
- date
- integer
- decimal
- Boolean (v2019.1+)
Value
The default value of a parameter. This is intended to be overwritten at runtime through the API.
Date values should be entered in yyyy-MM-dd format.
Null values may also be passed to parameters. In order to do so, the default value of the parameter needs to be set to {null}
. This will allow parameters to process any null values that are passed through the API or application at runtime.
In pre–v2019.1 versions, null values may only be passed to stringtype parameters.
Formulas as Default Parameter Values
Formulas that return strings, integers, dates or decimals may also be passed as parameter default values. Just as entering a function into a cell in the Report Designer, include an equals sign as a prefix (for example =QuarterNumber(Today())
).
Formulas may include multiple functions. As with other functions, these may also include other parameters.
The Admin Console will only allow String, Decimal or IntegerType parameters to have a formula as their default Value. If you need the Datetype, select String in the Admin Console, enter the formula into the Value field and then manually edit the XML configuration file to choose the desired data type.
Examples
1. This parameter as defined in the XML configuration file is date type and by default will return the value of the Today()
function, which is today’s date.
<parameter> <id>DateChoose</id> <data_type>date</data_type> <value>=Today()</value> <hidden>False</hidden> <prompt_text>Choose a date</prompt_text> </parameter>
2. This parameter defined in the Admin Console returns a string with an employee’s name. The employee’s name is decided based on the year of the current date.
3. This parameter defined in the Admin Console returns a decimal with the future value of an asset multiplied by 2.
Hidden
Set hidden to True to disable this parameter from being used by users in cells and formulas.
Prompt Text
Give non-hidden parameters a prompt text to query the user for a value at the time of report execution. Leave blank to use the default value.
Parameter Dropdown Object
Optional data object for populating the parameter as a drop-down selection list. Only applicable with prompting parameters. Commonly used in conjunction with programmable data objects (such as stored procedures).
Stored Procedure Parameters
A list of preexisting Exago parameters to be used as variables for a selected stored procedure.
Value Field
A column from the data object or custom SQL that sets that actual value of the parameter at runtime. This represents a set of values that are not displayed to the end user but are instead used when parameter values are required in custom SQL or stored procedures, or other server side processing.
Display Value Field
A column from the data object or custom SQL that sets the display value of the parameter for the dropdown selector. This represents the set of values that should be presented to the end user when they are executing or scheduling a report.
The Display Value is also displayed in reports and used in formulas (except in formula filters).
These distinct values can be accessed in formulas with
@ParameterName.Value@
and@ParameterName.DisplayValue@
respectively.
Display Type
The display value data type.
Report-Level Parameters v2019.1.3+
Report builders can define their own parameters on the report-level. These parameters function identically to parameters existing on the system-level and may be used within filters, functions, and so on within the report. Parameters defined in this way are only accessible within the report that they are created on. For more information, see Report-Level Parameters v2019.1.3+.
Report-level parameters cannot be used in report-level Custom SQL Objects in versions pre-v2021.1.1.
This feature is enabled by default and can be disabled by setting Show Report-Level Parameters Window to False. This setting is located in the Feature/UI Settings section of the Admin Console.
Modifying Report-Level Parameters via the .NET API
To modify existing report-level parameters:
- Load the report that the parameter is defined on.
- Iterate through the parameters collection to find the parameter.
- Finally, adjust the required values of the parameter
- Save it back to the API.
Currently, report-level parameters cannot be loaded or modified via the JavaScript API.
Example
ReportObject report = (ReportObject)api.ReportObjectFactory.LoadFromRepository(@"Reports\\Sales Reports"); report.Parameters.Find(x => x.Id == "SalesQuota").Value = "1500"; api.ReportObjectFactory.SaveToApi(report);
Additional Resources
- Admin Support Lab — Parameters (video)