Once you have created a report based on a Data Definition file (see Configuring a report based on a Data Definition (TTX) file for details), you can push runtime data to the report.
Note: The data structure of the runtime data being pushed to a report must match the data structure defined in the Data Definition file. The following example assumes that you have a java.sql.ResultSet object called runtimeResultSet with the appropriate data structure.
ReportClientDocument clientDoc = new ReportClientDocument();
clientDoc.open("RuntimeDataReport.rpt", 0);
DatabaseController dbCtrl = clientDoc.getDatabaseController ();
Note: The following code pushes data into the first table. It also assumes that a java.sql.ResultSet object called runtimeResultSet
has a structure that matches the first table.
ITable table = dbCtrl.getDatabase ().getTables ().getTable (0);
dbCtrl.setDataSource (runtimeResultSet, table.getAlias (), "RuntimeResultSet");
IReportSource reportSource = clientDoc.getReportSource ();
session.setAttribute ("reportsource",reportSource);
Once you have cached the report source, you can view or export the report.
Business Objects http://www.businessobjects.com/ Support services http://www.businessobjects.com/services/support/ |