AnsweredAssumed Answered

PDI pentaho reporting output parameter issue

Question asked by Narasimha Rao Ch on Sep 18, 2018
Latest reply on Sep 25, 2018 by Dean Flinter

Hi,

 

  I m using pentaho Data integrator 8.1 and pentaho reporting output component inside a transformation. The report contains a simple integer parameter ${batchno} which is working fine with report designer. But while running the PDI transformation it is unable to substitute the parameter value in the report. Here is the detailed error message i am getting. My data source is Mysql - JDBC connection.

 

2018/09/18 17:49:21 - Generate Reports.0 - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : Unexpected error

2018/09/18 17:49:21 - Generate Reports.0 - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : org.pentaho.di.core.exception.KettleException:

2018/09/18 17:49:21 - Generate Reports.0 - There was an unexpected error processing report 'D:\.....\testreport.prpt' to produce file 'D:\...\testreport.pdf' with processor: PDF.

2018/09/18 17:49:21 - Generate Reports.0 - Failed at query: select id_batch,object_name from pdi_channel_log

where id_batch =  ${batchno}

2018/09/18 17:49:21 - Generate Reports.0 -

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.processReport(PentahoReportingOutput.java:418)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.processRow(PentahoReportingOutput.java:143)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)

2018/09/18 17:49:21 - Generate Reports.0 - at java.lang.Thread.run(Thread.java:748)

2018/09/18 17:49:21 - Generate Reports.0 - Caused by: org.pentaho.reporting.engine.classic.core.ReportDataFactoryException: Failed at query: select id_batch,object_name from pdi_channel_log

where id_batch =  ${batchno}

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.queryData(SimpleSQLReportDataFactory.java:184)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SQLReportDataFactory.queryData(SQLReportDataFactory.java:142)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryStaticInternal(CompoundDataFactory.java:172)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryStatic(CompoundDataFactory.java:154)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.cache.CachingDataFactory.queryInternal(CachingDataFactory.java:408)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.cache.CachingDataFactory.queryStatic(CachingDataFactory.java:151)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryStaticInternal(CompoundDataFactory.java:168)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryStatic(CompoundDataFactory.java:154)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryData(CompoundDataFactory.java:67)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController.performQueryData(DefaultFlowController.java:256)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController.performQuery(DefaultFlowController.java:192)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.initializeForMasterReport(ProcessState.java:318)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:442)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1433)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.steps.pentahoreporting.ReportExportTask.execute(ReportExportTask.java:89)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.steps.pentahoreporting.ReportExportTask.run(ReportExportTask.java:76)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.processReport(PentahoReportingOutput.java:399)

2018/09/18 17:49:21 - Generate Reports.0 - ... 3 more

2018/09/18 17:49:21 - Generate Reports.0 - Caused by: java.sql.SQLException: Parameter metadata not available for the given statement

2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)

2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)

2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)

2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)

2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.MysqlParameterMetadata.checkAvailable(MysqlParameterMetadata.java:70)

2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.MysqlParameterMetadata.getParameterClassName(MysqlParameterMetadata.java:143)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.parametrize(SimpleSQLReportDataFactory.java:356)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.parametrizeAndQuery(SimpleSQLReportDataFactory.java:277)

2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.queryData(SimpleSQLReportDataFactory.java:179)

2018/09/18 17:49:21 - Generate Reports.0 - ... 19 more

2018/09/18 17:49:21 - Generate Reports.0 - child index = 1, logging object : org.pentaho.di.core.logging.LoggingObject@b66df16 parent=1cfddaa4-866d-4b08-9efb-c2a8842102e1

2018/09/18 17:49:21 - Generate Reports.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)

Outcomes