Specify the reaction behavior of a control
to determine how a control will react when another control, or an
object in the control, is selected.
About this task
You can specify the following reaction behaviors:
- Select an item in a control.
You can specify this reaction behavior for any control, except for single button controls.
For example, you specify a default value for a variable, and the variable drives a drop-down list control. When the report is run, you want the default value to appear in the control.
You can also specify to select the first or last item in a control by default. For example, an active report contains two data radio button groups that are connected to each other. The first data button group is driven by Product line and the second data button group is driven by Product type. When a user clicks on a product line, the product types that belong to the selected product line appear in the second radio button group, and you want the first or last radio button in the product type radio button group to be selected.
- Filter data in a control.
For example, you want to filter the
product types in a drop-down list control based on the product line
selected in another drop-down list control.
You can specify
this reaction behavior for drop-down lists, data drop-down lists,
list boxes, data list boxes, radio button groups, data radio button
groups, check box groups, data check box groups, lists, and crosstabs.
- Enable a control.
For example, you want to make a control interactive
only when a selection is first made in another control.
You
can specify this reaction behavior for any control, except for decks,
data decks, tabs, data tabs, lists, crosstabs, charts, and maps.
In addition to these behaviors, you can specify the item
to appear when nothing is selected in a list control, hide or show
a column, and whether to allow data to be sorted in a list.
IBM®
Cognos® Analytics - Reporting automatically sets the
reaction behavior when you define a connection between controls. However,
you may want to change the reaction behavior or specify additional
interactive behavior.
Procedure
-
Click the interactive behavior icon of the control.
-
If you want to specify the select an item in a control reaction behavior, and you want to specify to select the first item or the last item in the control by default, click the Auto Select menu and choose First Item or Last Item.
-
In the Reaction behavior box, click the reaction behavior box that you
want, such as Container selection, and click the edit button that appears.
If a condition is not yet defined, two dialog boxes appear. The second dialog box prompts you to
define the condition expression that you want to use to specify the reaction behavior.
Note: If the reaction behavior that you are setting is Container selection,
and you previously clicked an option other than None in the Auto
Select menu, defining a condition sets the Auto Select menu to
None. Similarly, if you define a condition in the Container
selection box, and you then set the Auto Select menu to an option
other than None, the condition is deleted.
- In the first Item box, define the
left side of the condition expression.
- To use a data item, click the Data Item radio
button and then click the item that you want to use.
The data items
that are available in the drop-down list depend on the data items
that you inserted into the control.
- To use a static item, click the Value radio
button, type the value that you want to use, and then specify the
value's data type.
The value must be defined as a value of the selected
active report variable in the next step.
- If you want to set the value of an active report variable to null,
click the Empty Variable radio button.
- Click the Operator drop-down list
and select the operator that you want to use.
- In the second Item box, define the
right side of the condition expression.
- To use a value in an active report variable, click the Active
Report Variable radio button and then click the variable
that you want to use.
The variables that are available in the drop-down
list depend on the variables that you defined in the report.
- To use a static item, click the Value radio
button, type the value that you want to use, and then specify the
value's data type.
- To use null as the value, click the Empty Data Item radio
button.
Use null as the value to specify the reaction behavior when
no data exists for the value selected in the source control.
- If you want to apply the condition when no item is selected
in the source control, clear the Drop this condition if
the variable is empty check box.
Clearing
the check box can improve performance and prompt users to perform
an action. For example, a report contains a list with many rows of
data, and the list is filtered by another control. When the check
box is cleared, no data will appear in the list until an item is selected
in the other control.