SSRS 报告查看器刷新而不查看报告
我正在使用reportviewer 9在.net web应用程序中显示SSRS报告 我有三个参数(代码如下) 我不想以编程方式传递任何参数 基本上我想要报告查看器显示带有参数的报告,然后选择任何内容 params 并每次按查看报告,即简单地不与网页交互。
发生的情况是它确实显示参数区域并启用了第一个参数下拉列表 但是当我选择某个值并单击第二个下拉列表时,它会全部刷新使用默认值检索的报告,并且所有下拉列表再次设置为默认值!
它不允许我以有序的方式依次选择 3 个参数下拉列表,然后单击“查看报告”
viewer.ServerReport.ReportServerCredentials =
new MyReportServerCredentials();
viewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; //work on report resides in the server not local
viewer.ShowFindControls = true;
viewer.ShowRefreshButton = true;
viewer.ShowExportControls = true;
viewer.ShowParameterPrompts = true; //hide parameters area and we will pass it through our controls
viewer.SizeToReportContent = true;
//viewer.ServerReport.
viewer.ServerReport.ReportServerUrl = new Uri(System.Configuration.ConfigurationSettings.AppSettings["ReportingServiceUrl"]); //Report Server URL not Report Server Manager URL
viewer.ServerReport.ReportPath = report.Path;
viewer.ServerReport.Refresh(); //display the report
I am displaying SSRS report in .net web app using reportviewer 9
I have three parameters (code below)
I dont want to pass any parameters programmatically
basically I want reportviewer display report with params and then select whatever
params and press View Report each time i.e. simple no interaction with web page.
What happens is it does display parameter area with first parameter dropdown enabled
but when I select some value and click on second dropdown it all refreshes report retrieved with defaults and all dropdowns set to defaults again!
It does not let me in orderly fashion to select 3 parameter dropdowns one after another and then click on View report
viewer.ServerReport.ReportServerCredentials =
new MyReportServerCredentials();
viewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; //work on report resides in the server not local
viewer.ShowFindControls = true;
viewer.ShowRefreshButton = true;
viewer.ShowExportControls = true;
viewer.ShowParameterPrompts = true; //hide parameters area and we will pass it through our controls
viewer.SizeToReportContent = true;
//viewer.ServerReport.
viewer.ServerReport.ReportServerUrl = new Uri(System.Configuration.ConfigurationSettings.AppSettings["ReportingServiceUrl"]); //Report Server URL not Report Server Manager URL
viewer.ServerReport.ReportPath = report.Path;
viewer.ServerReport.Refresh(); //display the report
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更改值是回发,您应该将代码包装在上面,以便仅在不回发时才会发生。
Changing values is a postback, you should wrap your code above so that it only occurs if not posting back.