Time for action – adding parameters to a report
In this example, we will add the year and month parameters to the report generated in the previous section. You need to perform the following steps after the execution of the previous example to add parameters to a report:
- Open the Sales by Product and Territory reports that were created in the previous example, and in the Report Data pane, right-click on Dataset and select Add Dataset.
- In the Dataset Properties window, rename the dataset to
- Select the Use dataset embedded in my report option. Choose Data source as AdventureWorksDW2012. Then, in the query box, type in the following query to fetch all years from the FactInternetSales table:
SELECT distinct (OrderDateKey/10000) as [Year] FROM FactInternetSales ...