开发者

How do I make SSRS ReportViewer wait until parameters are entered before rendering?

开发者 https://www.devze.com 2023-01-05 19:44 出处:网络
I have an SSRS report that\'s called up by a page with an ASP.Net ReportViewer object.The report takes parameters for filtering.Right now when the page is first called up, there are default values in

I have an SSRS report that's called up by a page with an ASP.Net ReportViewer object. The report takes parameters for filtering. Right now when the page is first called up, there are default values in the parameters and the viewer just takes off and renders a report with those settings. I thought this would be a nice time-saver, but my client complains that this takes several seconds, so what we 开发者_Go百科want to do now is have it just wait until I hit "View Report" before it tries to render anything.

What's the best approach? Not set defaults to the param's? Set the ShowReportBody to false? Something else? Seems like this should be simple.


Removing the default should will make the report not render. I think that's your only option. And also the simplest.

If some clients like the old behavior, you could provide defaults programatically for certain users. (IE, store a browser cookie that tells your page to provide defaults if they check a "save defaults" checkbox.)


I agree with Tims answer. But in my case NULL (no default) was interpreted as an option in the value list that is beeing loaded for that field from the db. So removing the default value was not the enough. What helped me was setting the default to a value that knowingly not exists on the loaded lookup list, in my case "-1". Some random GUID should do the trick in most cases.

0

精彩评论

暂无评论...
验证码 换一张
取 消