How to: Set a Variable for an SAP NetWeaver BI MDX Query (Report Builder 2.0)
Filtering data from an SAP NetWeaver Business Intelligence data source is accomplished through the use of variables defined on the data source as part of a Query cube definition. Variables are defined on the data source at the time the Query cube is created. Only Query cubes support variables. As with all query variables, Reporting Services automatically creates a query parameter bound to a report parameter, both with the same name as the unique name of the query variable on the Query cube.
To set the value for a variable
In the SAP NetWeaver Business Intelligence query designer in Design view, click the Variables () button on the toolbar. The Variables dialog box opens.
Note
This button is enabled only for Query cubes with variables already defined on the data source, and not for InfoCubes.
In the Default column, type or select a default value for each variable listed.
Click OK.
To add an existing variable to the query
Open the SAP NetWeaver Business Intelligence query designer in Query mode.
Note
To toggle between Design mode and Query mode, on the query designer toolbar, click the Design mode ().
The Variables pane displays a list of the existing variables defined for the Query cube.
From the Variables pane, drag the variable to the query text and drop it in a location that is syntactically correct for the MDX statement.
Click OK.
See Also