Package org.pentaho.reporting.libraries.resourceloader

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.registerDefaults()


  public void testRunSample() throws ResourceException
  {
    final URL url = getClass().getResource("Prd-2058.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.addExpression(new EventMonitorFunction());

    DebugReportRunner.execGraphics2D(report);
View Full Code Here


  public void testRunReport() throws Exception
  {
    final URL url = getClass().getResource("Prd-3562.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    PrintReportProcessor p = new PrintReportProcessor(report);
    p.paginate();
View Full Code Here

  {
    File file = GoldenSampleGenerator.locateGoldenSampleReport("Prd-3857-001.prpt");
    Assert.assertNotNull(file);

    final ResourceManager manager = new ResourceManager();
    manager.registerDefaults();
    final Resource res = manager.createDirectly(file, MasterReport.class);
    final MasterReport report = (MasterReport) res.getResource();

    List<LogicalPageBox> pages = DebugReportRunner.layoutPages(report, 0, 1);
    assertPageValid(pages, 0);
View Full Code Here

  public void testRunStickySub() throws Exception
  {
    final URL url = getClass().getResource("Prd-2974-2.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.getPageFooter().setSticky(false);
    report.getPageFooter().addElement(createLabel());
    report.getPageFooter().setName("Master-Footer");
View Full Code Here

  public void testRunStickyEverything() throws Exception
  {
    final URL url = getClass().getResource("Prd-2974-2.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.getPageFooter().setSticky(true);
    report.getPageFooter().addElement(createLabel());
    report.getPageFooter().setName("Master-Footer");
View Full Code Here

  public void testRunNonStickyEverything() throws Exception
  {
    final URL url = getClass().getResource("Prd-2974-2.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.getPageFooter().setSticky(false);
    report.getPageFooter().addElement(createLabel());
    report.getPageFooter().setName("Master-Footer");
View Full Code Here

  public void testRunStickyMasterFooter() throws Exception
  {
    final URL url = getClass().getResource("Prd-2974-2.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.getPageFooter().setSticky(true);
    report.getPageFooter().addElement(createLabel());
    report.getPageFooter().setName("Master-Footer");
View Full Code Here

  public void testTwoPageReport() throws Exception
  {
    final URL url = getClass().getResource("Prd-2974-2.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.getPageFooter().setSticky(false);
    report.getPageFooter().addElement(createLabel("PageFooter-Label"));
    report.getPageFooter().setName("Master-Footer");
View Full Code Here

  {
    final MasterReport basereport = new MasterReport();
    basereport.setPageDefinition(new SimplePageDefinition(new PageFormat()));
    final URL target = LayoutTest.class.getResource("nested-rows.xml");
    final ResourceManager rm = new ResourceManager();
    rm.registerDefaults();
    final Resource directly = rm.createDirectly(target, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    final LogicalPageBox logicalPageBox =
        DebugReportRunner.layoutSingleBand(basereport, report.getReportHeader(), false, false);
View Full Code Here

  public void testRunSample() throws Exception
  {
    final URL url = getClass().getResource("Prd-2849.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.getReportConfiguration().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.xml.Encoding", "UTF-8");
    final ByteArrayOutputStream out = new ByteArrayOutputStream();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.