final String inputName = "content.xml";
final String outputName = "content.xml";
final PentahoReportEngine engine = new PentahoReportEngine();
final ReportJobDefinition definition = engine.createJobDefinition();
final JobProperties procParms = definition.getProcessingParameters();
procParms.setProperty(ReportEngineParameterNames.INPUT_REPOSITORY, storageRepository);
procParms.setProperty(ReportEngineParameterNames.OUTPUT_REPOSITORY, storageRepository);
procParms.setProperty(ReportEngineParameterNames.INPUT_NAME, inputName);
procParms.setProperty(ReportEngineParameterNames.OUTPUT_NAME, outputName);
procParms.setProperty(ReportEngineParameterNames.CONTENT_TYPE, mimetype);
procParms.setProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY, dataFactory);
procParms.setProperty(ReportEngineParameterNames.IMAGE_SERVICE, new SOImageService(m_cmpCtx));
procParms.setProperty(ReportEngineParameterNames.INPUT_REPORTJOB_FACTORY, this);
procParms.setProperty(ReportEngineParameterNames.MAXROWS, maxRows);
if (author != null)
{
procParms.setProperty(ReportEngineParameterNames.AUTHOR, author);
}
if (title != null)
{
procParms.setProperty(ReportEngineParameterNames.TITLE, title);
}
return engine.createJob(definition);
}