Showing different tables in SSRS depending on Parameter

Viewed 136

I want to create an SSRS Report with two Tables.

  • First table with Products,
  • second table with customers.

Is it possible to create a Parameter named "VIEW". If an User want see the customers table then he select in parameter view the customers table and then jump to this particular table.

I can not use the visibility option because, if a choose the second table, then it not appear on the top of the site.

look like this

1 Answers

There are several ways to do this.

Option 1:

The simplest is just to hide you table by setting the Hidden property based on your parameter value so the Hidden property of the orders table might look something like =Parameters!VIEW.Value <> "Orders"

The problem is that this will still execute all dataset queries even though one is never shown.

Also the space for the hidden table will will just be blank so the seconds table will appears low on the page. You can work around this by stacking them on top of each other so they both have the same location property but it's messy.

Option 2:

Use three related reports. Create a report that only handles the orders table Create another that handles the Customer table Finally create a third report which simply has hyperlinks to the other reports, so rather than the user opening the report, choosing a parameter value and clicking view report, they open the 3rd report and then click on the link of the choice.

Option 3:

Show both tables and use a document map in the report so they can quick jump between the two tables.

There are many other way to do this but it really depends on how nice you want the results to look, how big the datasets are etc...

Related