I need a booklet with charts. Each chart represents the history of a KPI over time. So i thought creating a report, that contains the chart as a subreport.
The content of the chart could be updated using a parameter.

As long as my select is in the form
Code:
select field1, field2 from table where ${parameter}
or
Code:
select '${parameter}' as field1, field2 from table
it works.
If i try
Code:
select ${parameter}
, i get no error, but only an empty record set
But when i try
Code:
${parameter}
and have the parameter contain the complete SQL, i get a "failed at query ${parameter}"
The log shows:
Code:
org.pentaho.reporting.engine.classic.core.ReportProcessingException: Unable to initialize the report
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:481)
    at org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:90)
    at org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:274)
    at org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:187)
ParentException: 
org.pentaho.reporting.engine.classic.core.ReportDataFactoryException: Failed at query: ${kpi_evolution_query}
    at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.queryData(SimpleSQLReportDataFactory.java:265)
    at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SQLReportDataFactory.queryData(SQLReportDataFactory.java:107)
    at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryData(CompoundDataFactory.java:101)
    at org.pentaho.reporting.engine.classic.core.states.CachingDataFactory.queryInternal(CachingDataFactory.java:181)
    at org.pentaho.reporting.engine.classic.core.states.CachingDataFactory.queryData(CachingDataFactory.java:156)
    at org.pentaho.reporting.engine.classic.core.states.CascadingDataFactory.queryData(CascadingDataFactory.java:94)
    at org.pentaho.reporting.engine.classic.core.states.datarow.ReportDataRow.createDataRow(ReportDataRow.java:110)
    at org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController.performSubReportQuery(DefaultFlowController.java:253)
    at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.<init>(ProcessState.java:420)
    at org.pentaho.reporting.engine.classic.core.states.process.InlineSubreportProcessor.process(InlineSubreportProcessor.java:141)
    at org.pentaho.reporting.engine.classic.core.states.process.ProcessDetailsHandler.commit(ProcessDetailsHandler.java:73)
    at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.commit(ProcessState.java:785)
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPrepareLevels(AbstractReportProcessor.java:347)
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.performStructuralPreprocessing(AbstractReportProcessor.java:497)
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:411)
    at org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:90)
    at org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:274)
    at org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:187)
ParentException: 
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''select 1 as KPIPeriod,  12 as KPIvalue from kpilimits'' at line 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1448)
    at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.queryData(SimpleSQLReportDataFactory.java:255)
    at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SQLReportDataFactory.queryData(SQLReportDataFactory.java:107)
    at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryData(CompoundDataFactory.java:101)
    at org.pentaho.reporting.engine.classic.core.states.CachingDataFactory.queryInternal(CachingDataFactory.java:181)
    at org.pentaho.reporting.engine.classic.core.states.CachingDataFactory.queryData(CachingDataFactory.java:156)
    at org.pentaho.reporting.engine.classic.core.states.CascadingDataFactory.queryData(CascadingDataFactory.java:94)
    at org.pentaho.reporting.engine.classic.core.states.datarow.ReportDataRow.createDataRow(ReportDataRow.java:110)
    at org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController.performSubReportQuery(DefaultFlowController.java:253)
    at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.<init>(ProcessState.java:420)
    at org.pentaho.reporting.engine.classic.core.states.process.InlineSubreportProcessor.process(InlineSubreportProcessor.java:141)
    at org.pentaho.reporting.engine.classic.core.states.process.ProcessDetailsHandler.commit(ProcessDetailsHandler.java:73)
    at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.commit(ProcessState.java:785)
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPrepareLevels(AbstractReportProcessor.java:347)
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.performStructuralPreprocessing(AbstractReportProcessor.java:497)
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:411)
    at org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:90)
    at org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:274)
    at org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:187)
Is this supported in the 3.5 RC1 report writer?