Reporting Services 错误消息并导航回报告
我正在研究 SQL 报告服务。我有一个报告,其中输入了无效值作为报告标准的一部分,生成了带有错误消息的新屏幕,该屏幕上没有按钮,因此导航回报告的唯一方法是单击浏览器后退按钮,在这种情况下,所有已输入的搜索条件都会丢失。此错误消息屏幕由 Microsoft Reporting Services 生成。
我的问题是, 1) 是否可以在此错误页面添加后退按钮? 2)如何向该错误页面添加后退按钮? 3)如何保留已输入的参数(如果我使用后退按钮返回搜索条件页面)?
我们将不胜感激您的帮助。
干杯, 纳伦德拉
I am working on SQL Reporting services. I have a report where an invalid value is entered as part of the criteria for a report a new screen is produced with the error message, there are no buttons on this screen so the only way to navigate back to the report is by clicking on the browsers back button, in which case all of the search criteria already entered are lost. This error message screen is produced by Microsoft Reporting Services.
My Question are,
1) Is it possible to add a Back button to this error page?
2) How to add a Back button to this error page?
3) How parameters that have been entered can somehow be retained (if I use the back button to go back to the search criteria page)?
Your help will be appreciated.
Cheers,
Narendra
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用下拉菜单(正如 slugster 所建议的那样)。
如果做不到这一点,我想你必须找到一种方法来优雅地处理 sql 中的错误,并以某种方式传回一个数据集,其中包含一个错误标志,说明哪个参数有问题。然后,您可以隐藏所有原始报告,而是显示返回同一报告的 HTTP 链接,但在链接中包含参数(排除导致错误的参数)。
当他们单击此按钮重新运行它时,它应该具有除导致错误的参数之外的所有参数。
然而,我不建议这样做(大量的工作,混乱等),而是使用下拉菜单:)
Use dropdowns (as slugster suggests).
Failing that, I guess you'd have to figure out a way to gracefully handle the error in the sql and somehow pass back a dataset which contain an error flag saying which parameter was at fault. You could then hide all of the original report and instead show an HTTP link back to the same report, but with the parameters (bar the error causing one) in the link.
When they click this to rerun it, it should then have all the params except for the one causing the error.
However, I would not advise this (lots of work, messy etc) and instead go with dropdowns :)
回答您的问题:
正如@adolf大蒜所述,您可以创建另一个仅处理无效参数数据的数据集。这对您来说很混乱,但为用户提供了输入数据的灵活性,这可能是业务需求。如果是这种情况,我会查看 http:// /www.ssw.com.au/ssw/standards/rules/rulesToBetterSQLReportingServices.aspx 有关如何创建仅在数据无效时显示的错误消息的指南。该示例适用于没有数据的情况,但应该很容易适应不良数据的情况。
To answer your questions:
As stated by @adolf garlic, you could create another dataset that just handles invalid parameter data. It's messy on your end, but gives users the flexibility to type in their data, which may be a business requirement. If that is the case I would look at tip #10 on http://www.ssw.com.au/ssw/standards/rules/rulesToBetterSQLReportingServices.aspx for guidance on how to create a error message that only shows if the data is invalid. The example is for no data, but it should be fairly easy to adapt to your case of bad data.