I have created a prpt file that contains a table using report designer.I referred Will Gorman's book 'Pentaho reporting for Java developers'.I have parsed the prpt file and am trying to fill data from a query into this table using java.I am able to generate an empty pdf.Below is the code snippet :
This did not work.What is the correct way to populate an existing table?The prpt file already contains the basic outline of the table but filling the data in the table has to be done using java API.
The table is is in the format shown below :
Date | Duration (ms)
I want to fill dates below 'Date' label and durations below 'Duration ' label.
Code:
TypedTableModel ttm=newTypedTableModel(newString[]{"Date","Duration"});
while(res.next()){
ttm.addRow(newObject[]{res.getDate("date"),res.getLong("duration")});
}
This did not work.What is the correct way to populate an existing table?The prpt file already contains the basic outline of the table but filling the data in the table has to be done using java API.
The table is is in the format shown below :
Date | Duration (ms)
I want to fill dates below 'Date' label and durations below 'Duration ' label.