requirement: combine seperated reports in one main report and display sub-reports based on parameter selection.
Keywords: SSRS subreport hidden SSRS隐藏subreport
Explaination: 最近遇到一个头大的问题, 如何在SSRS中让隐藏的subreport不执行, 而不仅仅是隐藏起来让用户看不到,进而提高报表的性能。因为单纯的隐藏只是Layout层面的行为,底层的报表仍然在加载的时候会执行。
网上搜寻了半天,GOOGLE一堆英文, 最终还是自己在卫生间里灵机一动,解决方法如下:
Solution:
step1: set expression for visibility property of sub-report
step 2:
add execution flag for sub-report
step 3:
add execution flag parameter in sub-report dataset query.