Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Custom Exception Handling, Conditionally Terminating Report Generation
Vishnupriya
<p>Is there a way to throw an exception and terminate the report generation based on few conditions ?</p><p>Im looking for a sophisticated way of handling BIRT related and custom exceptions. I did not get much information about this in any of the forums or articles.</p><p> </p><p>This is what im trying to achieve.</p><ul class='bbc'><li>When the report is run thro' Report Viewer, i want to keep the existing model of adding errors to the task and listing them in red at the end of execution</li><li>When the report is run programatically, as in, thro a web application or a standalone application,</li><li> the report excecution should throw exception and <strong>terminate if there is a fatal exception</strong> like database fetch failure</li><li> the report should throw and <strong>log exceptions and proceed with report generation if the exception is less severe </strong>or a warning</li></ul>
<p>few questions..</p><ul class='bbc'><li> is it possible to <strong>set severity of exceptions </strong>based on the DesignElementHandle that is causing/raising the exception</li><li>is there a sophisticated way to get hold of ExecutionContext when the report generation is in progress, to play around with a task's Error handling methods</li><li><strong>CancelOrError can be set dynamically </strong>after the report generation begins ?</li></ul><p> </p><p>Thanks,<br />
Vishnupriya</p>
Find more posts tagged with
Comments
kclark
<p>I don't know about catching an exception in the design itself but I think it can be done since you can run Java code inside of the design. When running it [color=rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;]programatically[/color] I think this should be as easy as checking the type of exception then you could log it whatever way you want to and then choose weather or not to throw an exception and halt execution. Do you have a sample class I could run to try and create an example?</p>