Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Populating a report using the Report Engine API
Populating a report using the Report Engine API [message #719196] Fri, 26 August 2011 07:06 Go to next message
Ross Freemantle is currently offline Ross Freemantle
Messages: 1
Registered: August 2011
Junior Member
Hi,

I'm not sure if this is the right place to ask this question, so please bear with me if it isn't.

I'm using the BIRT Report Engine API to execute reports from my Java application. As I understand it, you would normally configure a data source and a data set within the report template. When the report is executed, this information is used to retrieve the data used to populate the report.

What I want to do is to provide the data used to populate the report directly from my Java application, without having to configure a data source and data set within the template. Is this possible?

Thanks in advance!
Re: Populating a report using the Report Engine API [message #719267 is a reply to message #719196] Fri, 26 August 2011 10:40 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

If you just want to push the data you could always add the object to the
appcontext from the RE API and then use a scripted datasource to iterate
over it. Or you could call the DE API from the RE API to add it
dynamically. I have a attached a scripted data source example that uses
the initialize event to load up a map that is then used in the scripted
data source. In your case you would load up the map in the RE API
program and set it in the appcontext like:

task.getAppContext().put( "mymap", loadedmapobject );

Then in the scripted data set open event you could get this object by
using the following:

reportContext.getAppContext().get("mymap");

The only draw back from this approach is that it will only work at run
time unless you implement the appcontext extension point for the designer.

Jason

On 8/26/2011 7:06 AM, Ross Freemantle wrote:
> Hi,
>
> I'm not sure if this is the right place to ask this question, so please
> bear with me if it isn't.
>
> I'm using the BIRT Report Engine API to execute reports from my Java
> application. As I understand it, you would normally configure a data
> source and a data set within the report template. When the report is
> executed, this information is used to retrieve the data used to populate
> the report.
>
> What I want to do is to provide the data used to populate the report
> directly from my Java application, without having to configure a data
> source and data set within the template. Is this possible?
>
> Thanks in advance!
Previous Topic:No Average in Data Cubes?
Next Topic:run insert statement from birt
Goto Forum:
  


Current Time: Wed Jul 23 20:35:34 EDT 2014

Powered by FUDForum. Page generated in 0.01573 seconds