Report parameter example

This example is based on the Sample application. It uses a report with two combo boxes to control the content of a second report. Both reports use report variables and report parameters. All that the two reports have in common is that they both use the Period and Region hierarchies of the Analysis cube as look ups.

  1. Create a report called Filters.
  2. Add two combo boxes and link them to the Period and Region dimensions of the Analysis cube.
  3. Create report variables called rv_date and rv_region.
  4. In Design mode, double-click the Period combo box to display the Format Listview dialog box.
  5. Specify rv_date as the value of the Input and Output variables.
  6. Open the Format Listview dialog box of the Region combo box and specify rv_region as the value of the Input and Output variables.
  7. Save the report.
  8. In Design Mode, right-click the Filters report in the Report Catalog and select Report Parameters.
  9. Click Add a Report Parameter and select rv_date from the list of report parameters.
  10. In the Type column, select Element.
  11. In the Look Up column, select the Period hierarchy of the Analysis cube.
  12. Add a second report parameter, using rv_region. Select Element as the Type and the Region hierarchy as the Look Up.
  13. Create a report called Formula.
  14. Create report variables called rv_period and rv_location.
  15. In a cell of the Formula report, create this ROC formula on the Analysis cube:
    =ROC("BestPracticesOLAP","ANALYSIS","[CHANNEL].[All Channels]","[MEASURE].[Gross Margin]",
    "[POS].[All Pos]","[PRODUCT].[All Tires]",ReportVariables.rv_period.Text,ReportVariables.rv_location.Text,
    "[VALTYPE].[Variance]")
    Note: The report displays #NA! because the two report variables are not filled.
  16. In Design mode, right-click the Formula report in the Report Catalog and select Report Parameters.
  17. Create report parameters from the rv_period and rv_location report variables. Select Element as the Type, and the Period and Region hierarchies respectively as the Look Ups.
  18. Drag the Filters and Formula reports onto a dashboard.
In the Widget Communication dialog box, two parameter connections are created. One parameter connection is called rv_date, rv_period. It contains the rv_date parameter from the Filter report and the rv_period parameter from the Formulas report. The second parameter connection is called rv_region, rv_location. It contains the rv_region parameter from the Filter report and the rv_location parameter from the Formulas report.

The value displayed in the Formulas report depends on the date and region selected in the Filter report.