title: PDI pentaho reporting output not working with parameters
body: <p>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.</p>
  
  <p>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</p>
  
  <p>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:</p>
  
  <p>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.</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - Failed at query: select id_batch,object_name from pdi_channel_log</p>
  
  <p><strong>where id_batch =  ${batchno}</strong></p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 -</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.processReport(PentahoReportingOutput.java:418)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.processRow(PentahoReportingOutput.java:143)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at java.lang.Thread.run(Thread.java:748)</p>
  
  <p>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</p>
  
  <p><strong>where id_batch =  ${batchno}</strong></p>
  
  <p>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)</p>
  
  <p>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)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryStaticInternal(CompoundDataFactory.java:172)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryStatic(CompoundDataFactory.java:154)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.cache.CachingDataFactory.queryInternal(CachingDataFactory.java:408)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.cache.CachingDataFactory.queryStatic(CachingDataFactory.java:151)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryStaticInternal(CompoundDataFactory.java:168)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryStatic(CompoundDataFactory.java:154)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryData(CompoundDataFactory.java:67)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController.performQueryData(DefaultFlowController.java:256)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController.performQuery(DefaultFlowController.java:192)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.initializeForMasterReport(ProcessState.java:318)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:442)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1433)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.steps.pentahoreporting.ReportExportTask.execute(ReportExportTask.java:89)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.steps.pentahoreporting.ReportExportTask.run(ReportExportTask.java:76)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.processReport(PentahoReportingOutput.java:399)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - ... 3 more</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - Caused by: java.sql.SQLException: Parameter metadata not available for the given statement</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.MysqlParameterMetadata.checkAvailable(MysqlParameterMetadata.java:70)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - at com.mysql.jdbc.MysqlParameterMetadata.getParameterClassName(MysqlParameterMetadata.java:143)</p>
  
  <p>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)</p>
  
  <p>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)</p>
  
  <p>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)</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - ... 19 more</p>
  
  <p>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</p>
  
  <p>2018/09/18 17:49:21 - Generate Reports.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)</p>