Adding Studio Reports Parameters
You can add parameters on the Parameters Details screen.
Figure 2: Parameter Details
To add or create parameters, click menu Tools → Parameters to open the Parameters screen. Click Add button. The options in this screen are given below.
Field | Description |
Name | Specify a name to uniquely identify this parameter. You can access this parameter in the report using this name enclosed by <% and %>. For example, Date. |
Prompt |
Specify the prompt caption that should appear on Input Parameter Form while prompting for this parameter. For example, if the name is Date, the prompt can be Product Date. |
Data Type |
Data typeInput toolsValidationsCHARText box, list box, multi select list boxAlphabets, numbers, or special characters are allowedNUMBERText boxNumbers are allowedDATEDate, date part, variable dateValid date according to selected input format
Predefined data variables such as MONTH_START_DATE, YEAR_START_DATE, and CURRENT_DATE BOOLEANCheck boxSelect or de-select |
Size | |
Format |
Based on the format selected, a format string appears in the entry box. Format string characters for date and time are as below: Negative numbers You can provide format strings (patterns) for positive number and negative number. To separate both the patterns, use a semi colon (;) character. For example, ##,###.##;(##,###.##).
|
Prompt Format |
Select the format for prompting the parameter. |
Default Value |
Specify the default value. This value is pre-populated on the parameter control on the Input Parameter Form when it is loaded. For multi select type controls, you can select multiple default values. For example, when you select parameter for data type as Date, the Default Value entry box changes to a drop-down. |
Database Time Zone |
You can take the default date ahead / behind the date falling on any of the options set. For example, you can set default date as 3 days after CURRENT_DATE, or 5 days before month start. You can do that by specifying CURRENT_DATE + 3 and MONTH_START_DATE – 5 respectively. At run time, the date that will appear will have default date accordingly. Time Zone is useful when different users access the application from different time zones. In such cases, it may happen that date/time data stored in database may be in one specific time zone and user may be accessing application from a different time zone. In this situation, application can convert date / time type data from one-time zone to another time zone. |
User Time Zone | In User Time Zone, select the time zone from where the user is expected to access the application and so provide parameter value in that time zone (to convert from). Select SYS_USER_TZ to use time zone applicable at run time (depending pre-set priority by the application). Select SYS_SERVER_TZ to use time zone set on Server Properties page (Report Server’s time zone). |
Prompt User Time Zone | Select Prompt User Time Zone check box to select time zone at run time at the time of providing value for this parameter on Parameter Details screen.
In Database Time Zone, select the time zone in which date / time data was entered in the database (to convert to). Select SYS_CONN_TZ to use time zone set on Database page. Select SYS_SERVER_TZ to use time zone set on Server Properties page (Report Server’s time zone). For time zone conversion to take place, value for database time zone and user time zone needs to be provided. |
Description | |
Mandatory | |
Visible | Select Visible check box to decide a parameter and if its values are visible to end user or not. By default, if this check box is selected, the parameter is displayed. Parameters to drill down reports are defined as visible false. Data security parameters must be defined with visible false. |
Enable | Select Enable check box to decide that the parameter is active on the Input Parameter Form for user inputs. By default, it is selected. This property can also be changed using scripting added to Input Parameter Form. |
Secure | Select this check box to secure the parameter values. |
Pass Values Using Table | Select Pass Values Using Table check box to pass multiple parameter values through a table. This is done especially when the number of values that can be passed (total number of bytes of selected values) as part of stored procedure or SQL is more than the limit allowed.
Maximum Selectable: Specify the maximum number of values a parameter can take as input.
|
Restrict to List | Select Restrict to List check box for the parameters for which Input Type is ‘Dropdown’. By default, it is selected to ensure that the users select value(s) only from the list.
Data Restriction: This property is visible to Super Admin users only. As a super administrator, you can assign a set of parameter values for each user or an organization. Hence, the user can select value(s) from the assigned set only. For example, if you want Tom to select values from ‘Central region’ and ‘Western region’, and John to select values from ‘Eastern region’ and ‘Alaska region’, then you set property as ‘True’ for this parameter and assign respective values. On Intellicus web portal home page, click Manage Users > Modify > Data Restriction screen to view this.
Setting Dropdown Source This is applicable when the input type for the parameter is Dropdown or Option. Values should be pre-defined or received from the database using an SQL. |
Input Type |
Input TypeControlEdit textTextbox control with type in cursorDropdownMulti-select list boxOptionsRadio buttonSliderRange of input type Input type for Boolean type parameters are as below. Boolean type parameters are represented as check boxes and have only two statuses: ‘Checked’ and ‘Clear’. To setup a Boolean type parameter:
Data Restriction: This property is visible to Super Admin users only. As a super administrator, you can assign a set of parameter values for each user or an organization. Hence, the user can select value(s) from the assigned set only. For example, if you want Tom to select values from ‘Central region’ and ‘Western region’, and John to select values from ‘Eastern region’ and ‘Alaska region’, then you set the property as ‘True’ for this parameter and assign respective values. On Intellicus web portal home page, click Manage Users > Modify > Data Restriction screen to view this.
Setting Dropdown Source To set pre-defined values:
To set dynamic values:
|
Display Parameter Name |
|
Display Column | |
Value Column | |
Multi Select | Select the Multi-Select tab header to select / specify multiple values for this parameter. For example, for Country Names, you can select multiple country names.
Maximum Selectable: Specify the maximum number of values a parameter can take as input.
Setting multiple default values A multi-select parameter may have multiple default values. Default values are displayed selected at runtime on Parameter Details screen. Under Select Default Values area, select any of the following options.
|
Search | If a parameter is specified in a text box at run time, there are chances that you may provide a value that does not exist in the database. To avoid this, the parameter offering is set to possible values as a combo-box or multi-select options because selecting becomes difficult when there are large number of possible values.
You can filter the values to be offered to select from. For example, from all the product numbers, you can select ‘product numbers of the products belonging to this category and that product line’. This is made possible through search options. Set up a parameter with Input Type as ‘Dropdown’ and Dropdown Source as ‘SQL’. Specify SQL to fetch the record-set. Select Search tab header. You can do a quick search by selecting Quick Search radio button and by providing minimum key length for search. OR You can do an advanced search by selecting Advance Search radio button by providing the values for each column. Here, the fields that you will use to apply filter criteria (to get list of options in the combo) are specified. Click Search button on this screen to get Search dialog box. You can provide filter options. The number of results displayed on the Result tab will depend on the value specified for the rows. An empty row will be auto-appended once you complete with present level entry. Click to delete respective row. To get filtered records on Result tab
On Result tab, you can view the values that satisfies the filter criteria given on the Search tab. Select a single value and click OK to proceed.
At run time, you will be presented with the Report Parameters screen for you to select parameters. |
Tree View | This provides additional information about the parameter value. For example, cities
Text box view
Tree View India
Madhya Pradesh
Indore
Bhopal
Karnataka
Bangalore
United States (parent node)
Nevada (child node)
Las Vegas (leaf)
California
San Francisco In this view, while you can view the parameter values (as last item in the hierarchy – leaf), you are also able to view other information about the parameter value. In this example, you can view the state and country in which a city is located. On the Input Parameter Form, you can select a branch to select all the values within the branch. Select Tree View tab header. For Source Type, select Flat or Hierarchical depending on database. In the first row of Levels, select the field that should appear topmost in the tree view. To have second branch, set the fields in second row When Flat is selected, An empty row will be auto-appended once you complete with present level entry. Click to delete respective row. Following type of tree views are available:
In case of Hierarchical, the query should return:
Example query for Oracle
At report’s run time, following screen appears for you to select parameters.
|
Link | A report may need multiple parameter values. In this case, value displayed for a parameter may depend on the value specified in other parameters. For example, values displayed in ‘Cities’ depends on the value selected in “States”.
You can link a parameter with a SQL combo type parameter. General steps to get filtered list by linking parameters
For example, to get list of cities belonging to state selected in another parameter, specify this SQL in SQL box of this parameter: Select CityNM from FinData where FinState=<%State%> At run time, Parameter Input Form appears with these two parameters. At that time, you can specify a value for ‘State’. This value is used to fetch values for this (for example CityNM) parameter. This dropdown will have only the cities belonging to the value provided for ‘State’. |
Validation | Applying range validations to parameter ensures that you do not key in invalid values. Validations can be set if the Input type of the parameter is ‘Text box’.
Select Validation tab header. You can provide:
Specifying validation for Number type parameter If valid value is a number onwards, mention in the starting number in From box, leave To box blank. If a valid value is up to a number, leave From box blank and mention the ending number in To box. A number can be positive, negative, with or without decimal point. For example, 24, -17 and 56.77. An empty row will be auto-appended once you complete with present level entry. Click to delete respective row. Range(s) Each character has a unicode ‘number’. Unicode of the character will be considered for range validation. To specify Range of characters, mention unicode of starting character in From box and that of ending character in To box (of the same row). If valid value is a character onwards, mention unicode of starting character in From box, leave To box blank. If valid value is up to a character, leave From box blank and mention unicode of ending character in To box. An empty row will be auto-appended once you complete with present level entry. Click to delete respective row. How to specify Date values You can specify a date or from dropdown, select any one among
YEAR_START_DATE (First day of the year in which the report would be generated).. |
Range | To specify range of dates, mention date in From box and To box (of the same row).
If valid value is a date onwards, mention date in From box, leave To box blank. If valid value is up to a date, leave From box blank and mention date in To box. An empty row will be auto-appended once you complete with present level entry. Click to delete respective row. About Scripts for parameter value validationYou can add a validation script for a parameter. Click Add Script button to open Script Editor screen and write the script. At parameter level (parameter name will appear in the section), OnChange() event is supported. It means, validation script will be executed when:
Validation script written at parameter level can access other report parameters. It can also access parameter objects (even if not imported) and global business parameters. This will be Read-only access. If the parameter value is valid, script will return ‘True’. If it is invalid, script will return ‘False’. You can set an error message that should be displayed if parameter validation fails. Report will not be generated if parameter validation fails. Using script, you can modify attributes of parameters. (For example, if paramA is invalid, disable paramB.) The Parameter Details screen reloads the parameters that are affected by the script. In case of scheduled report execution, the Parameter Details screen is not displayed. Hence, script will be executed at the time of saving of schedule tasks. Script will not be executed at report run time. |
Related content
Copyright Kyvos, Inc. All rights reserved.