Parameters are used throughout the Exago application to store values. Although parameters can be created and given a default value in the Administration Console, parameters are designed to be set at runtime through the API.
Parameters can be used to:
Important
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. For more information please see the Data Objects article.
All existing parameters are listed in the Admin Console Main Menu under Data. All the parameters that are added or edited will be displayed in a tab entitled Parameters.
Note
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.
Each Parameter has the following properties:
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).
Important
Parameter names are case sensitive.
The parameter data type. The following types are available:
Note
Select date for DateTimes and string for functions.
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.
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 (e.g. =QuarterNumber(Today())
).
Formulas may include multiple functions. As with other functions, these may also include other parameters.
Caution
The Admin Console will only allow String, Decimal or Integer Type parameters to have a formula as their default Value. If you need the Date type, 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.
Set hidden to True to disable this parameter from being used by users in cells and formulas.
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.
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).
A list of preexisting Exago parameters to be used as variables for a selected stored procedure.
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.
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).
Note
These distinct values can be accessed in formulas with
@[email protected]
and@[email protected]
respectively.
The display value data type.
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, please see the Report-Level Parameters section of the Advanced Options article.
Important
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.
To modify existing report-level parameters:
Note
Currently, report-level parameters cannot be loaded or modified via the JavaScript API.
ReportObject report = (ReportObject)api.ReportObjectFactory.LoadFromRepository(@"ReportsSales Reports"); report.Parameters.Find(x => x.Id == "SalesQuota").Value = "1500"; api.ReportObjectFactory.SaveToApi(report);