Control executing of hidden subreports inside tablix (SSRS)

怎甘沉沦 提交于 2019-12-11 23:57:55

问题


I am using SSRS2008R2, On my main report there is tablix inside tablic there is row (merged cells) which contain sub report. Subreport is initially hidden and toggled by other cell.


When I preview my report it is working fine, I can show and hide sub report clicking on "referat" cell.
But my problem is that for every row inside tablix SSRS generating subreport, That task take a lot of time. I want to make my hiden reports do not contain data and do not call SQL during first execution of report when they are hidden. I want to subreport do SQL call just before user expand (show). I know that I should pass different params to sub report so it can realize to do or not calling sql (sprocs). . But I do not know how to pass that parameter to subreport, or how to check is something hidden or not so i can change my param to subreport.


回答1:


The problem is that the Value of the parameter is not recalculated when you click on "referat" and the sub-report becomes visible. In other words, all sub-reports are run up front regardless of whether or not they are hidden. My suggestion would be to use linked reports instead. Under the Action section on a textbox properties you can select "Go to report". This may not be as visually appealing, but the sub-report will only be run when it is specifically requested.



来源:https://stackoverflow.com/questions/18247840/control-executing-of-hidden-subreports-inside-tablix-ssrs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!