views:

32

answers:

2

Guys,

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

+1  A: 

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 garlic
A: 

To answer your questions:

  1. There is no way to modify the error page
  2. See #1
  3. You can't retain the parameters and no workaround, see #1.

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.

Aaron D