public MasterReport createReport() throws ReportDefinitionException
{
// create a private instance of the parser so that we can safely modify
// the configuration..
final ReportGenerator generator = ReportGenerator.createInstance();
generator.setObject("outer-header-color", "red");
final URL in = getReportDefinitionSource();
if (in == null)
{
throw new ReportDefinitionException("URL is invalid");
}
try
{
MasterReport report = generator.parseReport(in);
final StyleSheetCollection styleCollection =
report.getStyleSheetCollection();
final ElementStyleSheet styleSheet =
styleCollection.createStyleSheet("my-style");
styleSheet.setStyleProperty(TextStyleKeys.FONT, "SansSerif");