Parameter Field
This dialog can be used to configure the parameter field properties of a report. It appears, if you select the menu item Properties in the context menu of a parameter field, create a new or edit an existing parameter field in the fields browser. In the Parameter Field Properties dialog you can add, edit, and remove any prompt field in the report. Using these prompt fields in the report gives you great flexibility in customizing the report.
Parameter fields, also known as prompt fields, are useful for providing dynamic information at run-time. They can be used to customize the report, e.g. suppress report fields or sections. They values are entered when the report itself is run. If a prompt field does not have a set value at runtime, the user will be prompted to enter a value for each of the prompts.
In the list on the left, you will see a list of all prompts in the report. Using the tool bar above the list will enable you to add and remove prompts to and from the list, as well as to change the order you would like the prompts to be in.
General Options
Here you can set the most frequently used options of the prompt.
Name
This is the name the prompt field is associated with. This name will be displayed to the user if the value is prompted. This name must not be empty, also it can not be identical to another already existing prompt field.
Prompting Text
This is the text which will accompany the prompt. Any explanation to the prompt should be placed in here. Note it is possible to use simple HTML syntax for the description - to do this, make sure the description begins with "<html>", for example: "<html>This is <b>MY</b> description." would show as "This is MY description."
Value Type
It is possible to set the value type the prompt is to have. Note the following special cases:
-
Password Prompts are string prompts which can not have any default values, nor can they be range prompts. When a password prompt is shown, the user's entry is masked by asterisks (*).
-
Boolean Prompts can not be range prompts.
-
Binary Prompts can not have any default values, nor can they be range prompts. They are intended only for when the report is run by a program making use of these prompts.
-
Note that String Prompts can be set by the user to have "no value", unless the prompt is declared as "default values only" or the prompt has a minimum length of any kind. This means the easiest way to assure the user may not choose "no value" for a string prompt is to specify a minimum length of 0 for the string prompt.
Default Values
Default values are displayed as pre-configured choices for the parameter field, which the user can choose from.
Static Values
Static default values are entered once, and never change. You can enter them by clicking into the table and entering an appropriate value, and a description for the value if you choose.
-
Double clicking on a cell enables you to edit any of the set default values.
-
Note also that date and datetime prompt values can be edited by clicking on the calendar button.
-
Using the tool bar above the default value table you can:
-
remove default values
-
change their order
-
add a range default value
This button is enabled only, if the prompt is set to be a range prompt.
In this case, the "Add a range default value" dialog appears.
In this dialog you can set a lower and/or upper limit and also specify whether the limits themselves will be included in the range or not. -
add a default value using a formula
In this case the Formula Editor appears and you can enter a formula to specify a default value.
-
Dynamic (Field) Values
Dynamic default values for this prompt field are generated each time a report is run. You can specify a database field (which must have the same type as the prompt field), which is used at run-time. The records of this database field are fetched and used as default values. The number of fetched records is limited to 1000. If you need more default values then you could use the cascading prompt to group the default values.
If you like, you can also specify a description field (from the same table) which is used as a source for the default value descriptions. Note also that SQL command fields are not possible to choose as dynamic value sources.
The option "Dynamic (Field) Values" is disabled if the report does not contain a database object from that it is possible to specify a database field that contains the default values for the parameter field.
Dynamic (SQL) Values
If you'd like, you can also manually enter a query to be used to fetch default values for this prompt field from a data source. If there is more than one data source (expect JSON and XML data source) in the report, you can choose which data source is to be used for the query by selecting the data source in the combo box above the query (this combo box only appears if there is more than one data source in the report.
The query's results should have the first column be the value of each default value to be shown and an optional second column as the description of each default value. The value type of the first column should correspond to the prompt's value type.
In the SQL you can use placeholder of formulas that are before reading. For example: {@myFormula}
There are various keyboard shortcuts for the SQL editor:
-
Ctrl.+Shift+F - formats the text to make it easier to read.
-
Ctrl.+Shift+L - toggles the visibility of line numbers in the editor.
-
Ctrl.+L - enables navigation to a specific line in the query.
-
Ctrl.+Space - opens up a menu for auto-completing SQL keywords while typing.
-
Ctrl.+Z/Ctrl.+Y - Undo / Redo.
Cascading Parent
For parameter fields with Dynamic(Field) or Dynamic(SQL) default values, it is possible to set a parameter field as a cascading parent. The cascading parent is a parameter field whose default values depend on the set value of a different parameter field. To do this, simply specify a parent parameter field for the cascading parameter field. When the user is prompted to enter prompt values, the value which is chosen for the parent parameter field will be used to filter the default values which appear for the cascading parameter field.
An example would be that you have a prompt "Country" which is a dynamic prompt which shows all countries in the database. You then specify a cascading prompt "City" which has "Country" as it's parent and which shows all cities in the database, filtered by country. When a user chooses a value for the country prompt, the city default values are loaded, filtered by the chosen country.
For more complex SQL statements it is also possible to set a Cascading Parent for parameter fields with Dynamic (SQL) default values.
It is only possible to choose a parameter as cascading parent if it itself is a dynamic parameter and if it itself does not already depend on the original parameter. Parameters which can not be set as cascading parent will not show up in the list of possible cascading parent parameters.
Advanced Options
The advanced options allow for deeper customization of the prompt fields.
Allow Multiple Values
This setting causes the user to be prompted to enter a number of values into a list of values. This list can be used as an array in formulas.
Discrete Values
The default setting of a prompt field. This means that only single values can be entered rather than range values.
Range Values
This setting means that the prompt only accepts ranges of values, e.g. "1 to 5" or "5/11/07 to 6/11/07".
Discrete and Range Values
This setting is only possible if the prompt accepts multiple values. It means that the list may include both discrete and/or range values.
Limit Value Range
This enables you to specify the range a value entered by the user must be in. It is possible to enter only a minimum or only a maximum value. Note that for string prompts, this setting means the minimum/maximum length a string value must have in order for it to be allowed - a string prompt with a minimum length of any kind will not have a button for setting "no value" as the parameter's value.
Default Values Only
This specifies whether the user is to be able to enter his or her own value into the prompt, or whether only the default values you provide are allowed to be used as prompt values. Note that if you set this option and only provide one default value, the prompt will be regarded as "hidden", since its value is then set and can not be changed.
Show Description Only
This setting specifies whether or not to display the actual values of the default values or not: If only the description is to be shown, the default value's value will still be used, but the user will only see its description when choosing it. Note that if a default value has no description, the value will then still be displayed.