Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: How can use the API to load a .prpt file from the repo

  1. #1
    Join Date
    May 2015
    Posts
    10

    Default How can use the API to load a .prpt file from the repo

    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

  2. #2
    Join Date
    May 2015
    Posts
    10

    Default

    I found a way by myself:

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

    https://help.pentaho.com/Documentati...70/010/0A0/0O0
    http://wiki.pentaho.com/display/Serv...y+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

  3. #3
    Join Date
    Oct 2015
    Posts
    5

    Default How to fill data into a table in a prpt file using java

    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 :
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.