Package org.pentaho.reporting.libraries.resourceloader

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


      throws ParseException
  {
    try
    {
      final ResourceManager mgr = new ResourceManager();
      final Resource resource = mgr.createDirectly(templateURL, MasterReport.class);
      return (MasterReport) resource.getResource();
    }
    catch (Exception e)
    {
      throw new ParseException("Failed to parse the report", e);
View Full Code Here


  {
    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");
    report.getReportHeader().getSubReport(0).getPageFooter().setName("Subreport-Footer");
View Full Code Here

  {
    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");
    report.getReportHeader().getSubReport(0).getPageFooter().setName("Subreport-Footer");
View Full Code Here

  {
    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");
    report.getReportHeader().getSubReport(0).getPageFooter().setName("Subreport-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);
    // simple test, we assert that all paragraph-poolboxes are on either 485000 or 400000
View Full Code Here

      throws ParseException
  {
    try
    {
      final ResourceManager mgr = new ResourceManager();
      final Resource resource = mgr.createDirectly(templateURL, MasterReport.class);
      return (MasterReport) resource.getResource();
    }
    catch (Exception e)
    {
      throw new ParseException("Failed to parse the report", e);
View Full Code Here

  {
    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();
    HtmlReportUtil.createZIPHTML(report, out, "report.html");
View Full Code Here

  {
    final URL url = getClass().getResource("Prd-3431.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final MemoryByteArrayOutputStream mbos = new MemoryByteArrayOutputStream();
    XmlTableReportUtil.createFlowXML(report, new NoCloseOutputStream(mbos));

    final ByteArrayInputStream bin = new ByteArrayInputStream(mbos.getRaw(), 0, mbos.getLength());
View Full Code Here

  {
    final URL url = getClass().getResource("Prd-3431.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final MemoryByteArrayOutputStream mbos = new MemoryByteArrayOutputStream();
    ExcelReportUtil.createXLS(report, new NoCloseOutputStream(mbos));

    final ByteArrayInputStream bin = new ByteArrayInputStream(mbos.getRaw(), 0, mbos.getLength());
View Full Code Here

      throws ParseException
  {
    try
    {
      final ResourceManager mgr = new ResourceManager();
      final Resource resource = mgr.createDirectly(templateURL, MasterReport.class);
      final MasterReport report = (MasterReport) resource.getResource();
      // this demo adds the image at runtime just to show how this could be
      // done. Usually such images get referenced from the XML itself without
      // using manual coding.
      final URL imageURL = ObjectUtilities.getResource
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.