'SSRS - How to change between report displayed based on the results of a dataset

I have three very different reports to display depending on a LOB code. LOB is not an input parameter, and I want to avoid it being one if possible. I also do not want to create 3 separate reports. Rather, I would like my report to be able to accept the user input, read the database to determine LOB, and display the appropriate subreport for the LOB. Is this doable? The only way i could find to do it was to have LOB as a parameter, and show\hide the subreports based on that parameter.



Solution 1:[1]

If you adopt the show/hide subreports based on the LOB approach where LOB is a parameter, then you should be able to do this but without requiring the use to enter the LOB type/value or whatever form it takes.

Based on your question it sounds like if you accept some user input via a parameter, you can then determine the LOB. If your LOB parameter has a default value based on a query such as

SELECT LOB from myTable WHERE someValue = @myUserInput

then you can hide the LOB parameter but still use it to control the visibility of the subreports.

If this does not help, then describe the workflow in more detail.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1