Examples of ReportDefinitionException


Examples of org.pentaho.reporting.engine.classic.demo.util.ReportDefinitionException

    generator.setObject("outer-header-color", "red");

    final URL in = getReportDefinitionSource();
    if (in == null)
    {
      throw new ReportDefinitionException("URL is invalid");
    }
    try
    {
      MasterReport report = generator.parseReport(in);
      final StyleSheetCollection styleCollection =
          report.getStyleSheetCollection();
      final ElementStyleSheet styleSheet =
          styleCollection.createStyleSheet("my-style");
      styleSheet.setStyleProperty(TextStyleKeys.FONT, "SansSerif");
      styleSheet.setStyleProperty(ElementStyleKeys.PAINT, Color.blue);

      report.setDataFactory(new TableDataFactory("default", data));
      return report;
    }
    catch (IOException e)
    {
      throw new ReportDefinitionException("IOError", e);
    }
    catch (ResourceException e)
    {
      throw new ReportDefinitionException("ResourceError", e);
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.demo.util.ReportDefinitionException

  protected static MasterReport parseReport(File reportFile) throws Exception
  {
    if (reportFile == null)
    {
      throw new ReportDefinitionException("ReportDefinition Source is invalid");
    }

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

Examples of org.pentaho.reporting.engine.classic.demo.util.ReportDefinitionException

  protected static MasterReport parseReport(URL in) throws ReportDefinitionException
  {
    if (in == null)
    {
      throw new ReportDefinitionException("ReportDefinition Source is invalid");
    }

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

Examples of org.pentaho.reporting.engine.classic.demo.util.ReportDefinitionException

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

Examples of org.pentaho.reporting.engine.classic.demo.util.ReportDefinitionException

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

Examples of org.pentaho.reporting.engine.classic.demo.util.ReportDefinitionException

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

Examples of org.pentaho.reporting.engine.classic.demo.util.ReportDefinitionException

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

Examples of org.pentaho.reporting.engine.classic.demo.util.ReportDefinitionException

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

Examples of org.pentaho.reporting.engine.classic.demo.util.ReportDefinitionException

      final Resource directly = resourceManager.createDirectly(getReportDefinitionSource(), MasterReport.class);
      return (MasterReport) directly.getResource();
    }
    catch (Exception rde)
    {
      throw new ReportDefinitionException("Failed", rde);
    }
  }
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.