Package org.pentaho.reporting.libraries.resourceloader

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


  {
    final URL url = getClass().getResource("Prd-3931.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.setCompatibilityLevel(ClassicEngineBoot.computeVersionId(4, 0, 0));

    final LogicalPageBox pageBox = DebugReportRunner.layoutPage(report, 0);
  //  ModelPrinter.INSTANCE.print(pageBox);
View Full Code Here


    final File file = new File (textField.getText());

    try
    {
      ResourceManager manager = new ResourceManager();
      Resource res = manager.createDirectly(file, MasterReport.class);
      return (MasterReport) res.getResource();
    }
    catch (Exception e)
    {
      throw new ReportDefinitionException("Parsing failed", e);
View Full Code Here

  {
    final URL url = getClass().getResource("subreport-crash.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport resource = (MasterReport) directly.getResource();

    DebugReportRunner.executeAll(resource);

  }
View Full Code Here

    // right now, this ends in a infinite loop. Not funny ..
    final URL url = getClass().getResource("subreport-pageheader.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport resource = (MasterReport) directly.getResource();

    DebugReportRunner.executeAll(resource);
    // subreports in the page-header must be handled gracefully.
  }
View Full Code Here

  public MasterReport createReport() throws ReportDefinitionException
  {
    try
    {
      final ResourceManager resourceManager = new ResourceManager();
      final Resource directly = resourceManager.createDirectly(getReportDefinitionSource(), MasterReport.class);
      return (MasterReport) directly.getResource();
    }
    catch (Exception rde)
    {
      throw new ReportDefinitionException("Failed", rde);
View Full Code Here

  public MasterReport createReport() throws ReportDefinitionException
  {
    try
    {
      final ResourceManager resourceManager = new ResourceManager();
      final Resource directly = resourceManager.createDirectly(getReportDefinitionSource(), MasterReport.class);
      return (MasterReport) directly.getResource();
    }
    catch (Exception rde)
    {
      throw new ReportDefinitionException("Failed", rde);
View Full Code Here

  public void load(final File file)
  {
    try
    {
      final ResourceManager resourceManager = new ResourceManager();
      final Resource resource = resourceManager.createDirectly(file, DrillDownProfileCollection.class);
      final DrillDownProfileCollection typeCollection = (DrillDownProfileCollection) resource.getResource();
      final DrillDownProfile[] types = typeCollection.getData();
      for (int i = 0; i < types.length; i++)
      {
        final DrillDownProfile metaData = types[i];
View Full Code Here

  {
    final URL url = getClass().getResource("Prd-3929-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.setCompatibilityLevel(ClassicEngineBoot.computeVersionId(4, 0, 0));

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
    //ModelPrinter.print(logicalPageBox);
View Full Code Here

      if (in == null)
      {
        return;
      }
      final ResourceManager mgr = new ResourceManager();
      final Resource resource = mgr.createDirectly(in, MasterReport.class);
      final MasterReport report = (MasterReport) resource.getResource();
      report.getReportConfiguration().setConfigProperty
          ("org.pentaho.reporting.engine.classic.core.AllowOwnPeerForComponentDrawable", "true");
      final PaintComponentTableModel tableModel = new PaintComponentTableModel();
      tableModel.addComponent(frame);
View Full Code Here

    }

    try
    {
      ResourceManager manager = new ResourceManager();
      Resource res = manager.createDirectly(in, MasterReport.class);
      return (MasterReport) res.getResource();
    }
    catch (Exception e)
    {
      throw new ReportDefinitionException("Parsing failed", e);
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.