I've made a report in SQL Server Reporting Services 2005. It contains 7 sub-reports. Six of them need to be shown/hidden, depending on a value in the database.
I used the Visibility.Hidden property of the sub-reports to do this, but I found out even when a sub-report is hidden, all queries are executed.
Is there a way, so the queries of the sub-report are not executed when they are hidden?
The only开发者_开发百科 thing I can think of is create different versions of the main report, but then I need to create like 64 (2^6) different versions. I could of course automate this, including deployement, but that's not what I want...
The solution I have come up with is to pass the parameter doShow to the sub-report (which also controls Visibility.Hidden, and pass it to the stored procedure. The query in the stored procedure then is enclosed by an if statement, testing the doShow value.
加载中,请稍侯......
精彩评论