PDA

View Full Version : How can use the API to load a .prpt file from the repo



clapas
06-25-2015, 11:43 AM
Hello,

there are some examples on how to load report files from filesystems in the book "Pentaho Reporting for Java Developers". However, I cannot figure out how to load a report from the BI server repo.

Any ideas?

Thanks,

Claudio

clapas
06-26-2015, 05:18 AM
I found a way by myself:

Using the BI Server API, which is documented in these pages:

https://help.pentaho.com/Documentation/5.2/0R0/070/010/0A0/0O0
http://wiki.pentaho.com/display/ServerDoc2x/Authentication+from+Third-Party+Applications

I had to pass the ResourceManager::createDirectly() method a byte[] instead of URL, which is what I found in the pentaho book.

Hope it helps. Cheers,

Claudio

wackypundit
10-21-2015, 06:54 AM
I have created a prpt file that contains a table using reprt 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 :


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.