Requirements are as follows:
- Grouping hierarchies should be swappable, for example
Country > City > DepartmentandCountry > Department > Citycan be selected by the end user. - For the end user, there should be only one report.
- The hierarchy that the user wants can be selected in a parameter value.
- The data for the report should only be loaded once, since the query contains cpu intensive calculations.
I'm trying to do this by adding subreports for each hierarchy. Since hidden subreports are automatically loaded, I cannot toggle visibility of multiple subreports, or the data will be loaded twice. The ReportName property of the Subreport does not allow expressions. Can I use custom code to solve this, or what is a viable solution?