Adding a parameter in the dataset

There are situations where we need to allow our report consumers to decide which attribute they want to filter their data with. We use a runtime parameter in these cases. Adding a parameter in a dataset based on a cube in the query designer is as easy as selecting a checkbox.

Let's convert our Date filter into a parameter:

  1. Start by modifying our Date filter in the filter pane. We will need the same dimension and hierarchy, that is, [Date] and [Calendar Year] respectively. You may need to delete the existing filter we created previously.
  2. Set the Operator to Equal.
  3. Leave the Filter Expression empty; or select a value, which assigns a default year value on runtime.
  4. Scroll to the far-right if you don't see the Parameters column. Select the checkbox to indicate that we want this Date filter as a dataset parameter.
    Adding a parameter in the dataset
  5. Click on OK twice to go back to the report designer window.

You may notice that the report designer now includes a report parameter named @DateCalendarYear as shown in the following screenshot:

Adding a parameter in the dataset

Let's preview the report, and check the added parameter:

Adding a parameter in the dataset
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.102.159