cvajre


We are displaying the report in our reporting application but we do not want to display errors from SSRS to the user. We want to handle the errors and display a user friendly message.

How can that be done . We are making URL access to the report server.

Thanks.





Re: Handling errors returned by SSRS

Teo Lachev


Please help me to understand this better. If you use URL addressability what application layer will handle the error messages If you use the VS.NET 2005 Report Viewer control, your application can handle the ReportError event.





Re: Handling errors returned by SSRS

cvajre

Alright,

So we are using an iframe in our application which we are making a url call to the report server. Hence, if there is a problem like "access" denied, we do not want the iframe to read "SQL Server error" but have some error that shows that the user is interacting with our application. This can only be done if on the report server we could write some generic error page which will always get called anytime ssrs throws an error.

Thanks.







Re: Handling errors returned by SSRS

Teo Lachev

Sorry, you are out of lack here. URL addressability is certainly very easy but not that flexible. Same limitations apply as invoking a server-side web page by URL.




Re: Handling errors returned by SSRS

RanjanRaghavendra

Hi,

I have my report viewer control and reporterror event to handel all the exception.Do we need to call the reporterror event in my code or automatically it will be called when error occurs

Thanks,

Ranjan





Re: Handling errors returned by SSRS

Teo Lachev

Not sure what you mean by call the event. The event handler will be called for you when the event happens (in this case the report errors out).




Re: Handling errors returned by SSRS

RanjanRaghavendra

Hi Teo,

If u have any sample code of how to show a report in reportviewer along with reporterror event and if you can post it here it would be very helpful.

Thanks,

Ranjan





Re: Handling errors returned by SSRS

Teo Lachev

private void reportViewer1_ReportError(object sender, Microsoft.Reporting.WinForms.ReportErrorEventArgs e)

{

// use e.Exception to get to the exception

// set e.Handled to true to prevent the ReportViewer from displaying an error message.

}

More about ReportViewer in this article.