Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
Caching result sets in BIRT
Migrateduser
<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
There are no comments yet