I am looking for java code in which have to display Pentaho reports in HTML/PDF format with Data Integration(.ktr file) as input to the Pentaho reports.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
First of all most probably there is official documentation to API, chapter "Embedding the Reporting Engine Into a Java Application"
Code it pretty simple
Create report using visual tool, assign data source as .ktr file, and code as example in tutorial.
Only u might need to customize path to *.ktr file which either can be made via official API (most probably) or prepare report *.prpt before to start report.
Pentaho Report Designer generate files with prpt extension which is just a zip file with a lot of xml files inside. So u need to unpack it (java.util.zip) and inside in folder datasources file kettle-ds.xml. Use any suitable xml parser to change path to *.ktr file and pack it back. Then pass customized report to report engine.