MasterReport report = new MasterReport();
StaticDataFactory staticDataFactory = new StaticDataFactory();
report.setDataFactory(staticDataFactory);
report.setQuery("org.pentaho.reporting.engine.classic.testcases.base.basic.SubReportParameterPassingTest#createMainTableModel()");
Element textElement =
TextFieldElementFactory.createStringElement
("reportField1", new Rectangle(0, 0, 100, 20), Color.BLACK,
ElementAlignment.LEFT, ElementAlignment.TOP,
new FontDefinition("Arial", 12), "-", "c1");
report.getItemBand().addElement(textElement);
SubReport subReport = new SubReport();
subReport.addInputParameter("c1", "c1");
subReport.setQuery("org.pentaho.reporting.engine.classic.testcases.base.basic.SubReportParameterPassingTest#createSubReportTableModel(c1)");
Element subReportTextElement =
TextFieldElementFactory.createStringElement
("subreportField1", new Rectangle(20, 0, 100, 20),
Color.RED, ElementAlignment.LEFT,
ElementAlignment.TOP, new FontDefinition("Arial", 12), "-", "t1");
subReport.getItemBand().addElement(subReportTextElement);