Search code examples
javaeclipsedatasetbirt

Access data from a BIRT dataset within a Java class


I am relatively new with BIRT eclipse. I created a java project and a report file. The report has an Oracle DB connection, and I am working with one table. I want to access BIRT datasets with Java, so I can manipulate data rather than using only JavaScript. I have an idea in which I could connect them through importing the Java class to the onFetch() method on the dataset, but I'm unsure.


Solution

  • What you want to use are "computed columns". For a data set you can add computed columns additional to the fetched columns from your data source. In the computation script you can reuse the fetched columns as input for your computation. As a result your data set contains your fetched columns and your computed columns.

    This example adds 1 to the fetched value of the column PK:

    enter image description here