conn = dataSourceProvider.getConnection(dataSource.getId());
// Use JasperReports Query logic to parse parameters in chart
// queries
JRDesignQuery query = new JRDesignQuery();
query.setText(reportChart.getQuery());
// convert parameters to JRDesignParameters so they can be parsed
Map jrParameters = ORUtil.buildJRDesignParameters(parameters);
pStmt = JRQueryExecuter.getStatement(query, jrParameters, parameters, conn);