So without further ado, here are some tips and tricks I’ve stumbled across. I’ll amend this post with updates. Feel free to contribute your own in the comments!
[Updated 2011/07/21: add note about EngineException]
I’ve found that it’s also useful to put a breakpoint on org.eclipse.birt.report.engine.api.EngineException as this seems to be thrown when there is a calculation error of some kind within the report. If you’re getting an error displayed like:
Errors occurred when generating the report document for the report element with 2906
org.eclipse.birt.report.engine.api.ViewerException is thrown when there’s some deeper issue affecting report generation.
ViewerException: The viewing session is not available or has expired
The system that I’m developing uses a web interface to view BIRT reports. I found that during development that the report generation would fail, complaining that “The viewing session is not available or has expired”. It turns out that although I was accessing the web interface through “localhost”, internally the system would redirect to the machine’s alternative name “dev.mt.ca”. As my browser was configured to ignore cookies from other domains, the BIRT session cookies were tossed.
All was well when I accessed the web interface using the alternative machine name.
EngineException: Can not load the report query
I’ve usually seen this exception in a few circumstances:
- When binding a table to a dataset and specifying a column that no longer exists. “Refreshing” a table’s bindings only adds missing columns; there’s no warnings of bad references. (I wonder if there’s a way to trap references to non-existant columns?)
- Having changed a table grouping’s name, but forgetting to update any aggregations defined by that grouping name.