Package org.pentaho.reporting.engine.classic.core.modules.parser.base

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.base.ReportGenerator


  public void testPre401() throws Exception
  {
    // Boot the system

    // Load the report
    final ReportGenerator generator = ReportGenerator.getInstance();
    final MasterReport report = generator.parseReport
        (ObjectUtilities.getResourceRelative("IncomeStatement.xml", IncomeStatementTest.class));
    // Create the report and export to the supplied output filename
    PdfReportUtil.createPDF(report, "report.pdf");
    HtmlReportUtil.createStreamHTML(report, "bug.html");
  }
View Full Code Here


  public void testPre401() throws Exception
  {
    // Boot the system

    // Load the report
    final ReportGenerator generator = ReportGenerator.getInstance();
    final MasterReport report = generator.parseReport
        (ObjectUtilities.getResourceRelative("Pre437.xml", Pre437Test.class));
    // Create the report and export to the supplied output filename
    ExcelReportUtil.createXLS(report, new NullOutputStream());
  }
View Full Code Here

  public void testPre401() throws Exception
  {
    // Boot the system

    // Load the report
    final ReportGenerator generator = ReportGenerator.getInstance();
    final MasterReport report = generator.parseReport
        (ObjectUtilities.getResourceRelative("Prd821.xml", Prd821Test.class));
    // Create the report and export to the supplied output filename
    TestSystem.showPreview(report);
  }
View Full Code Here

   * @param args ignored.
   */
  public static void main(final String[] args)
  {
    ClassicEngineBoot.getInstance().start();
    final ReportGenerator gen = ReportGenerator.getInstance();
    final URL reportURL = ObjectUtilities.getResourceRelative
        (REFERENCE_REPORT, ObjectReferenceGenerator.class);
    if (reportURL == null)
    {
      System.err.println("The report was not found in the classpath"); //$NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); //$NON-NLS-1$
      System.exit(1);
      return;
    }

    final MasterReport report;
    try
    {
      report = gen.parseReport(reportURL);
    }
    catch (Exception e)
    {
      System.err.println("The report could not be parsed."); //$NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); //$NON-NLS-1$
View Full Code Here

   * @param args ignored.
   */
  public static void main(final String[] args)
  {
    ClassicEngineBoot.getInstance().start();
    final ReportGenerator gen = ReportGenerator.getInstance();
    final URL reportURL = ObjectUtilities.getResourceRelative
        (REFERENCE_REPORT, DataSourceReferenceGenerator.class);
    if (reportURL == null)
    {
      System.err.println("The report was not found in the classpath"); //$NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); //$NON-NLS-1$
      System.exit(1);
      return;
    }

    final MasterReport report;
    try
    {
      report = gen.parseReport(reportURL);
    }
    catch (Exception e)
    {
      System.err.println("The report could not be parsed."); //$NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); //$NON-NLS-1$
View Full Code Here

   * @param args ignored.
   */
  public static void main(final String[] args)
  {
    ClassicEngineBoot.getInstance().start();
    final ReportGenerator gen = ReportGenerator.getInstance();
    final URL reportURL = ObjectUtilities.getResourceRelative
        (REFERENCE_REPORT, StyleKeyReferenceGenerator.class);
    if (reportURL == null)
    {
      System.err.println("The report was not found in the classpath"); //$NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); //$NON-NLS-1$
      System.exit(1);
      return;
    }

    final MasterReport report;
    try
    {
      report = gen.parseReport(reportURL);
    }
    catch (Exception e)
    {
      System.err.println("The report could not be parsed."); //$NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); //$NON-NLS-1$
View Full Code Here

  private MasterReport parseReport(final URL templateURL)
      throws IOException
  {
    try
    {
      final ReportGenerator generator = ReportGenerator.getInstance();
      return generator.parseReport(templateURL);
    }
    catch (Exception e)
    {
      ReportConverter.logger.info("ParseReport failed; Cause: ", e);
      throw new IOException("Failed to parse the report");
View Full Code Here

   * @throws ParseException if the report could not be parsed.
   */
  private MasterReport parseReport(final URL templateURL)
      throws ParseException
  {
    final ReportGenerator generator = ReportGenerator.getInstance();
    try
    {
      final MasterReport report = generator.parseReport(templateURL);
      // plain text does not support images, so we do not care about the logo ..
      report.getParameterValues().put("logo", null);
      return report;
    }
    catch (Exception e)
View Full Code Here

  }


  protected void previewReport(final JInternalFrame frame)
  {
    final ReportGenerator generator = ReportGenerator.getInstance();
    try
    {
      final URL in = ObjectUtilities.getResourceRelative
          ("component-drawing.xml", ComponentDrawingDemoHandler.class);
      if (in == null)
      {
        return;
      }
      final MasterReport report = generator.parseReport(in);
      report.getReportConfiguration().setConfigProperty
          ("org.pentaho.reporting.engine.classic.core.AllowOwnPeerForComponentDrawable", "true");
      final PaintComponentTableModel tableModel = new PaintComponentTableModel();
      tableModel.addComponent(frame);
      report.setDataFactory(new TableDataFactory("default", tableModel));
View Full Code Here

   * @throws ParseException if the report could not be parsed.
   */
  private MasterReport parseReport(final URL templateURL)
      throws ParseException
  {
    final ReportGenerator generator = ReportGenerator.getInstance();
    try
    {
      return generator.parseReport(templateURL);
    }
    catch (Exception e)
    {
      throw new ParseException("Failed to parse the report", e);
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.modules.parser.base.ReportGenerator

Copyright © 2018 www.massapicom. 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.