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)
Caching result sets in BIRT
Cain
<p>I was wondering if it's possible to render a report twice, but only retrieve the data from the database once. The reason for this is that we are using a different charting solution rather than the built in functionality in BIRT and when emailing a report as say, as PDF, I need to include one or more charts are part of the report. The data for the chart is based of the result of a rendered report. The workflow would be something like:</p>
<p> </p>
<p>1. Render report and emit as json data</p>
<p>2. Parse json data and create one or more charts</p>
<p>3. Re-render report, adding in charts as images, emit as PDF</p>
<p> </p>
<p>Because the data is being pulled from an active database, retrieving the results from the database twice is not an option because the report data and the chart data may not match up, not to mention the extra load this puts on the database. The reason that the charts depend on json data from a report is because of calculated columns. The raw data from the database will not have the calculated columns we require.</p>
<p> </p>
<p>The other alternative would be to execute a query outside of birt, and pass that result set into BIRT when rendering the report. This way we could render the report as many times as we like using the same data. I considered creating something like a CSV file from the jdbc result set and passing that in to birt as a flat file data set, but I'd prefer not to add the overhead of parsing the data and writing it to a file, then reading said file.</p>
<p> </p>
<p>I guess a third option would be to add some sort of custom design element that represents the charts we want to make, then create our charts as part of the rendering process. I don't know how doable something like that is though.</p>
Find more posts tagged with
Comments
mwilliams
<p>You could always take a look at something like this:</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/873-report-document-oda/'>http://developer.actuate.com/community/forum/index.php?/files/file/873-report-document-oda/</a></p>
;
<p> </p>
<p>Another option would be to use BIRT Designer Professional. With it, you have the ability to create data objects that can be executed to create a data cache file that you can use as a source for a design.</p>