Re: Web Viewer Error Handling
Data Dynamics Reports Support
Web Viewer Error Handling
03-08-2010, 11:26 AM
In continued evaluation of DD Reports I was wondering if there was any way to provide better error handling in the web viewer?
Currently if you open a new report in the designer add a table save, then try and load the report in the viewer it will trigger a debugger in my w3wp.exe worker process on my dev machine with a exception of "The DataRegion 'Table1' must specify a dataset."
This is a valid exception however the web viewer will on show a blank screen with the following text: "Report {0} was not found".
Is there any way for the viewer to display the exception message and not throw an unhandled exception in to the w3wp process?
The built in designer viewer will display detail about the exception, however we are trying to use the webviewer as a server side preview in our own designer, since there is no way to use the winform/designer preview but have the report execute on the application server.
Thanks.
Re: Web Viewer Error Handling
03-10-2010, 5:05 AM
Hello,
Currently the exceptions thrown while rendering the report are handled by the product internally. However, we do have a feature request in our system to add this functionality in the future versions of Data Dynamics Reports. The relevant case number for the same is 33106. I have added your email address to the list of affected users for this case. You will be notified once a build containing an implementation of this feature will be released.
Amit Pal
GrapeCity- DataDynamics
Re: Web Viewer Error Handling
03-10-2010, 8:13 AM
The issue we have is that the exception is not handled at all, and since it seems to happen in the corehandler I think on a background thread it causes an unhandled exception in the w3wp.exe triggering the process to shutdown and on my workstation hangs as the JIT debugger is invoked.
So what worries us is what happens in a production enviroment when this occurs? Would this trigger a worker process shutdown and event log all because a user forgot to set a dataset for a table in thier report? This could be bad for things like session state etc. in the same worker process.
Is there any workaround for catching the exception ourselves for now? I tried adding a Application_Error handler to global.asax but it did not seem to catch it.
Thanks for adding me to the case number on this.
Re: Web Viewer Error Handling
03-11-2010, 11:36 AM
Justin,
The use case which you are reporting with the handling of exceptions has been entered in our system as Case 144003. Please disregard the case from my last post as the new one is specifically for the Web Viewer.
I have also added your email address to the list of affected users for Case 144003. You will receive the notification email once the build containing an implementation of this feature will be released.
Amit Pal
GrapeCity- DataDynamics
Re: Web Viewer Error Handling
07-30-2010, 5:22 AM
Hello,
Case 144003 (Web-viewer shuts down asp.net process if a report rendering causes unhandled exception) has been implemented in the latest build (1.6.1871.45) of DataDynamics Reports. A new MessagetoShow property in the arguments of the Error event has been designed. In the error event, user can set this property to any text to be shown inside the Web Viewer whenever the error occurs.
You may download this build from here:
ftp://ftp.fpoint.com/ActiveReports/builds/1.6.1871.45.zip
Amit Pal
GrapeCity- DataDynamics
Re: Web Viewer Error Handling
08-02-2010, 2:14 PM
In testing this issue it seems the Error event does not fire if the WebViewer is in PDF mode, which of course is what we use by default:
ReportViewer1.ViewerType = ViewerType.Pdf;
So if a runtime error occurs in PDF all that comes out is a blank page, but if the user manually changes back to HTML mode the error event is fired and the message displayed.
Also in the case of a database error, such as a malformed SQL Statement, the exception given to the error handler is simply 'Object reference not set to an instance of an object.' Instead of the actual message returned from the SQL server.
So while this is closer to what we need, it is still incomplete in our opinion.
Re: Web Viewer Error Handling
08-02-2010, 2:33 PM
Please ignore my last post, it seems this only occurs of the report design is blank.
If the report has any content then the proper SQL error is displayed even in PDF mode.
Not sure why the HTML page throws a error but the PDF version does not on a blank report, this is an uncommon and minor issue.
Re: Web Viewer Error Handling
08-03-2010, 3:44 AM
Hello,
I have entered Case 148362 in our system for this.
As a use case, I would like to know the behavior you are expecting when showing a blank report in the WebReportViewer. Do you want Error event to be raised for both of these ViewerTypes in case of blank report or you do not want this event to be raised in such a case.
Amit Pal
GrapeCity- DataDynamics
Re: Web Viewer Error Handling
08-03-2010, 8:07 AM
I assumed the error was generated because I put a bad SQL statement in a dataset, but I am guessing the SQL statement is not executed unless some control is bound to it.
So I am not sure what the object reference error is referring to in HTML mode, but I would prefer no error, just a blank page like the PDF, if the report is blank but has encountered no errors.
Re: Web Viewer Error Handling
08-04-2010, 4:09 AM
Thanks for your suggestion.
I have updated Case 148362 with your observations.
Amit Pal
GrapeCity- DataDynamics