Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Using .prpt files in Java application

  1. #1
    Join Date
    Jan 2018
    Posts
    1

    Default Using .prpt files in Java application

    Hello guys,
    I am trying to use Pentaho reporting functionality in my application. I have a MariaDB database from which I want to get data.
    I tried to mix up Sample1.java (which uses premade .prpt template) and Sample2.java (which uses database connection) but unsuccessfully.
    I made a template in Pentaho Report Designer and exported .prpt, but when I try use it everytime I get
    Exception in thread "main" java.lang.NullPointerException: Key data must not be null. at org.pentaho.reporting.libraries.resourceloader.DefaultResourceManagerBackend.createKey(DefaultResourceManagerBackend.java:50)
    at org.pentaho.reporting.libraries.resourceloader.ResourceManager.createKey(ResourceManager.java:151)
    at org.pentaho.reporting.libraries.resourceloader.ResourceManager.createKey(ResourceManager.java:137)
    at org.pentaho.reporting.libraries.resourceloader.ResourceManager.createDirectly(ResourceManager.java:213)
    at org.pentaho.reporting.engine.classic.samples.Sample1.getReportDefinition(Sample1.java:66)
    at org.pentaho.reporting.engine.classic.samples.AbstractReportGenerator.generateReport(AbstractReportGenerator.java:160)
    at org.pentaho.reporting.engine.classic.samples.AbstractReportGenerator.generateReport(AbstractReportGenerator.java:128)
    at org.pentaho.reporting.engine.classic.samples.Sample1.main(Sample1.java:121)
    Do you maybe have some advice? How getReportDefinition() method should look like? And maybe I am not generating .prpt file properly from Report Designer?
    Using Sample2.java works fine, but the output file has no template so it looks terrible. Is there any other way to customize it than generating .prpt in Report Designer?

  2. #2
    Join Date
    Aug 2016
    Posts
    1

    Default

    Hello, I don't know if you figured it out but you can checkout this project: https://github.com/creditdatamw/spr

Tags for this Thread

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 - 2017 Pentaho Corporation. All Rights Reserved.