Specifying parameterized filters
When defining reports that use parameterized filters either using the Dynamic Workload Console, Application Lab, or composer, for the value, use the one reported in the Cognos® Report Studio.
About this task
The following example demonstrates how
to specify parameters that use parameterized filters by using the Dynamic Workload Console:
- In the Properties - Cognos page of the Workload Designer in the Dynamic Workload Console, click the Cognos tab.
- Select the name of the parameter you want to specify for the report.
- In the Report section, click the addition (+) symbol for Parameter list to add a new parameter.
- In the Name field, type the name of the parameter you want to specify for the report.
- In the Value field, type the value reported
in the Cognos Report
Studio. To identify the value proceed as follows:
- Open Report Studio.
- Open the report to run.
- In the Insertable Objects pane, select the filter you want to use. The Properties page is displayed.
- Select the Ref value.
This example shows how to run the Cognos Employee Training by
Year sample report, specifying for the ?pYear? parameter the
value associated with the filter 2004. The Employee Training
by Year sample report is located under /Samples/Models/Dashboard
Objects. To run the report proceed as follows:
- In the Insertable Objects pane, select the 2004 filter. The Properties panel is displayed.
- Select [go_data_warehouse].[2004].
- Insert [go_data_warehouse].[2004] in the Value field.
- Save the job definition.
To specify parameters
that use parameterized filters using composer, perform the
following procedure.
- Open Report Studio.
- Open the report to run.
- In the Insertable Objects pane, select the filter you want to use. The Properties panel is displayed.
- Select the Ref value.
- Copy this value in the <jsdlcognos:parametersValues> attribute.
Below an example for the Employee Training by Year sample report specifying
for the ?pYear? parameter the value associated with the filter 2004:
<jsdlcognos:reportGroup> <jsdlcognos:ReportPathGroup> <jsdlcognos:reportPath> Employee Training - Path:/content/folder[@name='Samples'] /folder[@name='Models'] /folder[@name='Dashboard Objects'] /report[@name='Employee Training'] </jsdlcognos:reportPath> </jsdlcognos:ReportPathGroup> <jsdlcognos:parametersValues> <jsdlcognos:parametersValue> key="pYear">[go_data_warehouse].[2004] </jsdlcognos:parametersValue> </jsdlcognos:parametersValues> <jsdlcognos:outputFile> C:\Cognos reports\Employee Training </jsdlcognos:outputFile> <jsdlcognos:formatTypes>HTML</jsdlcognos:formatTypes> </jsdlcognos:reportGroup>