本文整理汇总了Java中org.pentaho.reporting.engine.classic.core.MasterReport.addPreProcessor方法的典型用法代码示例。如果您正苦于以下问题:Java MasterReport.addPreProcessor方法的具体用法?Java MasterReport.addPreProcessor怎么用?Java MasterReport.addPreProcessor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.reporting.engine.classic.core.MasterReport
的用法示例。
在下文中一共展示了MasterReport.addPreProcessor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testApply
import org.pentaho.reporting.engine.classic.core.MasterReport; //导入方法依赖的package包/类
@Test
public void testApply() throws Exception
{
ReportPreProcessor preProcessor = create();
MasterReport report = new MasterReport();
report.getPageFooter().addElement(TableTestUtil.createDataItem("Dummy Item"));
report.addPreProcessor(preProcessor);
MasterReport materialize = materialize(report.derive(true), preProcessor);
Assert.assertEquals(BandStyleKeys.LAYOUT_BLOCK, materialize.getPageFooter().getLayout());
Assert.assertEquals(2, materialize.getPageFooter().getElementCount());
Band oldContent = (Band) materialize.getPageFooter().getElement(0);
Assert.assertEquals(1, oldContent.getElementCount());
Assert.assertEquals(report.getPageFooter().getElement(0).getObjectID(), oldContent.getElement(0).getObjectID());
Band newContent = (Band) materialize.getPageFooter().getElement(1);
Assert.assertEquals(1, newContent.getElementCount());
Assert.assertEquals("Text",
newContent.getElement(0).getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE));
}
示例2: testApply
import org.pentaho.reporting.engine.classic.core.MasterReport; //导入方法依赖的package包/类
@Test
public void testApply() throws Exception {
ReportPreProcessor preProcessor = create();
MasterReport report = configureReport();
report.addPreProcessor(preProcessor);
MasterReport materialize = materialize(report.derive(true), preProcessor);
Assert.assertEquals(1, materialize.getReportHeader().getSubReportCount());
SubReport sr = materialize.getReportHeader().getSubReport(0);
DataFactory dataFactory = sr.getDataFactory();
TableModel tableModel = dataFactory.queryData("parameter-data", new StaticDataRow());
Assert.assertEquals(tableModel.getColumnCount(), 3);
Assert.assertEquals(tableModel.getRowCount(), 2);
Assert.assertNotNull(sr.getAttribute(AttributeNames.Wizard.NAMESPACE, "wizard-spec"));
Assert.assertEquals(1, sr.getPreProcessorCount());
Assert.assertEquals(WizardProcessor.class, sr.getPreProcessor(0).getClass());
}
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:21,代码来源:GenerateParameterInformationPreProcessorTest.java
示例3: testApplyOnRun
import org.pentaho.reporting.engine.classic.core.MasterReport; //导入方法依赖的package包/类
@Test
public void testApplyOnRun() throws Exception
{
MasterReport report = new MasterReport();
report.addPreProcessor(create());
report.getPageFooter().addElement(TableTestUtil.createDataItem("Dummy Item"));
LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
// Use this to create a print-out of the layout model. This allows you to inspect the model
// more easily than with the debugger.
//ModelPrinter.INSTANCE.print(logicalPageBox);
RenderNode[] labels = MatchFactory.findElementsByElementType(logicalPageBox, LabelType.INSTANCE);
Assert.assertEquals("Original label has been printed", 5, labels.length);
}