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:

  1. 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.
  2. In the Dataset Properties window, rename the dataset to Years.
  3. 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 ...

Get Microsoft SQL Server 2014 Business Intelligence Development: Beginner’s Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.