In this article
You set up Parameters in the report tree - a Parameters folder is located towards the bottom of the tree. To create a new parameter:
- Right-click on the Parameters folder and select Add Parameter .
- To edit the parameter name, right-click on the parameter and select Rename, or press the F2 key on your keyboard.
- To modify the parameter properties, right-click on the parameter and select Properties.
Figure 1 - Adding a Parameter
A new parameter is added to the folder.
Parameters must have unique names consisting of letters, numbers and/or underscore, and starting with a letter or underscore.
The parameter property pane opens .as below.
Figure 2 - Parameter properties
Note: The properties listed in this pane depend on the parameter Type selected.
Parameter Properties
To modify the parameter properties, right-click on the parameter and select Properties. The parameter property pane opens .
Figure 3 - The Parameter properties page
The parameter Type options are as follows:
- Fixed Questionnaire Element - you define a list of questions that the viewer can select from. This type is typically used in conjunction with a Navigator on a report page. Add the Navigator to the page and drop the Parameter on the Navigator. To specify the possible values of the parameter, double-click the parameter and add elements from the data source to the Parameter Values tree.
- Free Questionnaire Element - the parameter is not defined by a list of questions, but is a placeholder and will be set by a selection made by the viewer in a drill-down (for example, selecting a statement from a grid), thus inheriting the item the viewer selected in a table/chart.
- Derived Questionnaire Element - similar to free values, but instead of being set to the item the viewer selected, it can be set to a corresponding item. This is typically used to associate open text variables with for example elements of a grid.
- Response parameters - these are used to store answers on a given question. To connect the parameter to a specific question, first set the parameter type in the property sheet, then double-click the parameter and drag the question into the screen. The options are:
- String Response - for string fields. The parameter can hold values that are answers to string-based questions such as single, multi, grid or hierarchy (note that open-text cannot be used). Double-click the parameter to define the question that is to be used to build the list of possible values for the parameter. String response parameters are typically used in List components.
- Numeric Response - the parameter can hold a numeric value and can be used in input components.
- Date Response - the parameter can hold a date value and can be used in calendar components, for example interview_start.
- Project - a parameter type used to store a specific survey project. Possible values for this parameter type must be defined by using scripting, either by adding projects based on a data source node ID (double-click node project in the data source to see the ID) or by using project IDs directly. You are recommended to use data source node IDs as long as your project is in the data source. Then you can easily change the project of the report by replacing the elements in the data source.
- Segment - used to store a segment. Create a list of segments by dragging them into the list from the segment part of the data source.
- Banner - in the event the report has more than one banner, the parameter allows dynamic selection of banners on a table by the viewer. The user can then choose which banner they wish to use by selecting it in the parameter navigator.
- Geolocation - this type of parameter could for example be used in a verbatim table.
The parameter types can be used in a variety of ways, but all of them can be connected to one or more of the List, Hierarchy, and Calendar Input Visual Components. The parameters can be used as follows:
- Build logic based on parameter-selected values in any type of report script.
- Use the parameter values as filters. To do this, create a new filter using the filter expression designer.
- Add the parameter to a table. For a single question, this will show the question masked by the selected values for the parameter.
Note: The remaining properties available in the property sheet depend on the Type selected above. The properties are as follows:
- Hide in Active Summary Filter - (all) check the box to hide the current value for this parameter from the active filter summary of a page.
- Active Filter Summary Sequence - (all) enter a sequence number to be used to sort the items in the active filter summary component. Items with a low number will be displayed before items with a higher number.
- Corresponding Parameter - (Derived) the ID of the parameter that this variable is to be derived from.
- Type - (Derived) there are 3 different methods of deriving a parameter:
- Replace - a part of the text in the original parameter value (From Text) is replaced by new text (To Text).
- Add Prefix - adds the specified text to the beginning of the variable name. Input the text into the Prefix field.
- Add Suffix - adds the specified text to the end of the original parameter. Input the text into the Suffix field.
- Multi-select - (String) check this box if you wish the user to be able to select multiple values for this parameter.
- Field Source - (String) there are two different ways of specifying which questionnaire element is to be used when loading lists of possible values for a parameter:
- A fixed field - a specific questionnaire element in the survey. Double-click the parameter to select the element that is to be used.
- A parameter - the questionnaire element is derived from the current value of another parameter. The other parameter should be a questionnaire element parameter.
- Title - (all) specify the text to be used in the report when referring to the parameter. You can include a title for each report language.
Parameter Designer
To open the parameter designer, double-click on the parameter or right-click the parameter and select Edit.
For Fixed Questionnaire Element, define the list of questions the viewer is to be able to select from by dragging them from the Data Source into the Parameter Designer .
Note: You are recommended to use the designer to insert one question into the parameter for the two other parameter types, so a question is available to use in previews in the table and chart designers. However in the real report, this question will not be used unless it has been selected by the viewer drilling down in a table or chart.
Figure 4 - Using the Parameter Designer
Drag-and-drop elements from the Data Source onto the parameter tree. In the figure above, when the "Powered Windows" item is dropped into the designer it will be inserted after "A/C". Note that you can drag entire folders, condition, blocks etc. onto the parameter tree, and you can use standard Windows selection techniques to select multiple items to drag-and-drop.
You can organize the parameter content into folders. To insert a folder into the parameter tree, drag-and-drop a folder from the Data Source or right-click on the tree and select Insert Folder .
Inserting a folder
Folders will be used to group elements if the "Parameter navigator" is set up as a drop-down menu.
A Free Questionnaire Element parameter does not have any particular settings as it is merely a placeholder for the variable the viewer selects using the drill-down functionality.
For Derived Questionnaire Element parameters . you must define which variable is to be derived from the viewers' selection. For example, if there is a 3D grid element with a set of 3 statements, which contains a grid question q1 (satisfaction) and a multi open text q2 (comments), the items of the grid would be variables q1_1, q1_2 and q1_3, and the three comments would be in variables q2_1, q2_2 and q2_3.
The Derived Questionnaire Element properties
You must have a corresponding "Free values" parameter (p1 in the figure above) that the substitutions will be based on. Then when the viewer clicks on element 1, q1_1 is set for this parameter.
If you set Derivation Type to "Replace", a part of this variable name will be substituted based on the From and To Text settings. Here "q1" will be replaced with "q2", giving q2_1. The other two derivation types are Add Prefix and Add Suffix. Add Prefix will add the text you specify to the beginning of the variable name, and Add Suffix will add text to the end of the variable name. An example of the former could be satisfaction questions q1_1, q1_2, q2_1 which had corresponding importance questions imp_q1_1, imp_q1_2,imp_q2_1. An example of the latter could be that you had a set of questions q1, q2, q3 and corresponding comments as q1_other, q2_other, q3_other.