how to display a custom error message on Reporting Services
Fellows, I'm creating a report to be seen directly by the clients, so I need to ensure maximum user-friendliness. When the user types an invalid date string the report throws a "rsReportParameterTypeMismatch" and displays an error messages like this: An error occurred during local report processing Query Execution Failed for data set 'myDataSet' or An error occurred during local report processing The value provided for the report parameter 'foo' is not valid for its type I want to replace this cryptic (for the final user) message for a more friendly custom message. How or where can I write them? How do I intercept the exception? Is it possible at all? I don't need anything too complex, just changing the words, perhaps colors and sizes would suffice.
November 11th, 2010 3:20pm

Well this is going to be tricky, just giving you a heads up,you might have to do lot of work you can use SQL is date finction or you can wrtie Queery in following wasy IIF( SELECT Count(*) FROM ABCD WHERE A IN (@YouParameter ) = 0) THEN SELECT "not a valid range " IIF(ISdate(@YourParameer) = 'False') SELECT "Invalidate" ELSE You Query Than you can Show/hide your table or matrix by writing some expression in Report body and Display relevant data. Howe this will help ya!! Gaurav Gupta http://sqlservermsbiblog.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
November 11th, 2010 9:35pm

Hi LynxK, To display the customized error message if the users provide a invalid date string, 1. Insert a TextBox and type the error message, and write an expression about validing the date to control the TextBox's visibility. 2. Insert a Rectangle control on the report body, drag and drop the ReportItems of your report into it, and write an expression about validing the date to control the Rectangle's visiblity. so that if the date string is invalid , the textbox is shown and the Rectangle is hidden, vice versa. thanks, Jerry
November 15th, 2010 5:40am

Hi, I have a question about this particular solution - from what I understand, this would involve changing the parameter's datatype from DATE to TEXT, right?. Does this not mean that in order to be able to validate and display our own error message regarding the validity of a date, we lose the calendar option that comes with having the parameter set as a date? Is there no other way of pre-validating a parameter value before Reporting Services gets its hands on it, or otherwise overriding the default error messages displayed? Thanks Das
Free Windows Admin Tool Kit Click here and download it now
March 24th, 2011 2:14pm

Hi Das, I am also facing same Issue, Please let me know if you have any solution for this. Regards, Mandava.
December 11th, 2011 5:07am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics