("sun:oo://" + reportResource, OfficeDocument.class);
final OfficeDocument report = (OfficeDocument) res.getResource();
report.setDataFactory(new StarReportDataFactory(dataSourceFactory));
final ReportParameters inputParameters = report.getInputParameters();
final ParameterMap queryParameters = definition.getQueryParameters();
final String[] paramKeys = queryParameters.keys();
for (int i = 0; i < paramKeys.length; i++)
{
final String key = paramKeys[i];
inputParameters.put(key, queryParameters.get(key));
}
return report;
}