Package com.sun.star.report.pentaho.model

Examples of com.sun.star.report.pentaho.model.OfficeReport


            final Node[] nodes = report.getNodeArray();

            final FormulaParser parser = new FormulaParser();
            final ArrayList expressions = new ArrayList();
            final OfficeReport officeReport = (OfficeReport) ((Section) nodes[0]).getNode(0);
            final Section reportBody = (Section) officeReport.getBodySection();
            collectGroupExpressions(reportBody.getNodeArray(), expressions, parser, officeReport.getExpressions());
            parameters.put(SDBCReportDataFactory.GROUP_EXPRESSIONS, expressions);
            final String command = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, "command");
            final String commandType = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, SDBCReportDataFactory.COMMAND_TYPE);
            final String escapeProcessing = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, SDBCReportDataFactory.ESCAPE_PROCESSING);
            report.setQuery(command);
            parameters.put(SDBCReportDataFactory.COMMAND_TYPE, commandType);
            parameters.put(SDBCReportDataFactory.ESCAPE_PROCESSING,new Boolean(!("false".equals(escapeProcessing))));
           
            final String filter = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, "filter");
            parameters.put(SDBCReportDataFactory.UNO_FILTER, filter);
           
            final long startTime = System.currentTimeMillis();
            final ReportProcessor rp = getProcessorForContentType(contentType);
            rp.processReport(job);
View Full Code Here


    private final List postBodyHandlers;
    private boolean pre = true;

    public ReportReadHandler()
    {
        rootSection = new OfficeReport();
        rootSection.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, "simple-report-structure", Boolean.TRUE);
        functionHandlers = new ArrayList();
        preBodyHandlers = new ArrayList();
        postBodyHandlers = new ArrayList();
    }
View Full Code Here

        final Section section = new Section();
        section.setNamespace(JFreeReportInfo.REPORT_NAMESPACE);
        section.setType("template");
        super.initialize(section, flowController, parent);

        final OfficeReport report = (OfficeReport) node;
        final ArrayList tables = new ArrayList();
        if (report.getPageHeader() != null)
        {
            addFromSection(tables, (Section) report.getPageHeader());
        }
        if (report.getReportHeader() != null)
        {
            addFromSection(tables, (Section) report.getReportHeader());
        }
        addPBody(tables, (Section) report.getPreBodySection());
        addFromBody(tables, (Section) report.getBodySection());
        addPBody(tables, (Section) report.getPostBodySection());
        if (report.getReportFooter() != null)
        {
            addFromSection(tables, (Section) report.getReportFooter());
        }
        if (report.getPageFooter() != null)
        {
            addFromSection(tables, (Section) report.getPageFooter());
        }

        this.nodes = (Node[]) tables.toArray(new Node[tables.size()]);
    }
View Full Code Here

   */
  protected LayoutController processContent(final ReportTarget target)
      throws DataSourceException, ReportProcessingException,
      ReportDataFactoryException
  {
    final OfficeReport or = (OfficeReport) getElement();

    switch (state)
    {
      case OfficeReportLayoutController.STATE_NOT_STARTED:
      {
        return delegateToTemplates(OfficeReportLayoutController.STATE_TEMPLATES);
      }
      case OfficeReportLayoutController.STATE_TEMPLATES:
      {
        return delegateSection(or.getPageHeader(),
            OfficeReportLayoutController.STATE_PAGE_HEADER_DONE);
      }
      case OfficeReportLayoutController.STATE_PAGE_HEADER_DONE:
      {
        return delegateSpreadsheetSection(or.getPageHeader(),
            OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_HEADER_DONE);
      }
      case OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_HEADER_DONE:
      {
        return delegateSection(or.getPageFooter(),
            OfficeReportLayoutController.STATE_PAGE_FOOTER_DONE);
      }
      case OfficeReportLayoutController.STATE_PAGE_FOOTER_DONE:
      {
        return delegateSection(or.getColumnHeader(),
            OfficeReportLayoutController.STATE_COLUMN_HEADER_DONE);
      }
      case OfficeReportLayoutController.STATE_COLUMN_HEADER_DONE:
      {
        return delegateSection(or.getColumnFooter(),
            OfficeReportLayoutController.STATE_COLUMN_FOOTER_DONE);
      }
      case OfficeReportLayoutController.STATE_COLUMN_FOOTER_DONE:
      {
        return delegateSection(new VariablesDeclarationSection(),
            OfficeReportLayoutController.STATE_INITIAL_VARIABLES_DONE);
      }
      case OfficeReportLayoutController.STATE_INITIAL_VARIABLES_DONE:
      {
        return delegateSection(or.getReportHeader(),
            OfficeReportLayoutController.STATE_REPORT_HEADER_DONE);
      }
      case OfficeReportLayoutController.STATE_REPORT_HEADER_DONE:
      {
        return delegateSection(or.getBodySection(),
            OfficeReportLayoutController.STATE_REPORT_BODY_DONE);
      }
      case OfficeReportLayoutController.STATE_REPORT_BODY_DONE:
      {
        return delegateSection(new VariablesDeclarationSection(),
            OfficeReportLayoutController.STATE_REPORT_FOOTER_VARIABLES);
      }
      case OfficeReportLayoutController.STATE_REPORT_FOOTER_VARIABLES:
      {
        return delegateSection(or.getReportFooter(),
            OfficeReportLayoutController.STATE_REPORT_FOOTER_DONE);
      }
      case OfficeReportLayoutController.STATE_REPORT_FOOTER_DONE:
      {
        return delegateSpreadsheetSection(or.getPageFooter(),
            OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_FOOTER_DONE);
      }
      case OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_FOOTER_DONE:
      {
        final OfficeReportLayoutController olc = (OfficeReportLayoutController) clone();
View Full Code Here

   */
  protected LayoutController processContent(final ReportTarget target)
      throws DataSourceException, ReportProcessingException,
      ReportDataFactoryException
  {
    final OfficeReport or = (OfficeReport) getElement();

    switch (state)
    {
      case OfficeReportLayoutController.STATE_NOT_STARTED:
      {
        return delegateToTemplates(OfficeReportLayoutController.STATE_TEMPLATES);
      }
      case OfficeReportLayoutController.STATE_TEMPLATES:
      {
        return delegateSection(or.getPageHeader(),
            OfficeReportLayoutController.STATE_PAGE_HEADER_DONE);
      }
      case OfficeReportLayoutController.STATE_PAGE_HEADER_DONE:
      {
        return delegateSpreadsheetSection(or.getPageHeader(),
            OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_HEADER_DONE);
      }
      case OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_HEADER_DONE:
      {
        return delegateSection(or.getPageFooter(),
            OfficeReportLayoutController.STATE_PAGE_FOOTER_DONE);
      }
      case OfficeReportLayoutController.STATE_PAGE_FOOTER_DONE:
      {
        return delegateSection(or.getColumnHeader(),
            OfficeReportLayoutController.STATE_COLUMN_HEADER_DONE);
      }
      case OfficeReportLayoutController.STATE_COLUMN_HEADER_DONE:
      {
        return delegateSection(or.getColumnFooter(),
            OfficeReportLayoutController.STATE_COLUMN_FOOTER_DONE);
      }
      case OfficeReportLayoutController.STATE_COLUMN_FOOTER_DONE:
      {
        return delegateSection(new VariablesDeclarationSection(),
            OfficeReportLayoutController.STATE_INITIAL_VARIABLES_DONE);
      }
      case OfficeReportLayoutController.STATE_INITIAL_VARIABLES_DONE:
      {
        return delegateSection(or.getReportHeader(),
            OfficeReportLayoutController.STATE_REPORT_HEADER_DONE);
      }
      case OfficeReportLayoutController.STATE_REPORT_HEADER_DONE:
      {
        return delegateSection(or.getBodySection(),
            OfficeReportLayoutController.STATE_REPORT_BODY_DONE);
      }
      case OfficeReportLayoutController.STATE_REPORT_BODY_DONE:
      {
        return delegateSection(new VariablesDeclarationSection(),
            OfficeReportLayoutController.STATE_REPORT_FOOTER_VARIABLES);
      }
      case OfficeReportLayoutController.STATE_REPORT_FOOTER_VARIABLES:
      {
        return delegateSection(or.getReportFooter(),
            OfficeReportLayoutController.STATE_REPORT_FOOTER_DONE);
      }
      case OfficeReportLayoutController.STATE_REPORT_FOOTER_DONE:
      {
        return delegateSpreadsheetSection(or.getPageFooter(),
            OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_FOOTER_DONE);
      }
      case OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_FOOTER_DONE:
      {
        final OfficeReportLayoutController olc = (OfficeReportLayoutController) clone();
View Full Code Here

    final Section section = new Section();
    section.setNamespace(OfficeNamespaces.INTERNAL_NS);
    section.setType("template");
    super.initialize(section, flowController, parent);

    final OfficeReport report = (OfficeReport) node;
    final ArrayList tables = new ArrayList();
    if (report.getPageHeader() != null)
    {
      addFromSection(tables, (Section) report.getPageHeader());
    }
    if (report.getReportHeader() != null)
    {
      addFromSection(tables, (Section) report.getReportHeader());
    }
    addFromBody(tables, (Section) report.getBodySection());
    if (report.getReportFooter() != null)
    {
      addFromSection(tables, (Section) report.getReportFooter());
    }
    if (report.getPageFooter() != null)
    {
      addFromSection(tables, (Section) report.getPageFooter());
    }

    this.nodes = (Node[]) tables.toArray(new Node[tables.size()]);
  }
View Full Code Here

            final Node[] nodes = report.getNodeArray();

            final FormulaParser parser = new FormulaParser();
            final ArrayList expressions = new ArrayList();
            final OfficeReport officeReport = (OfficeReport) ((Section) nodes[0]).getNode(0);
            final Section reportBody = (Section) officeReport.getBodySection();
            collectGroupExpressions(reportBody.getNodeArray(), expressions, parser, officeReport.getExpressions());
            parameters.put(SDBCReportDataFactory.GROUP_EXPRESSIONS, expressions);
            final String command = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, "command");
            final String commandType = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, SDBCReportDataFactory.COMMAND_TYPE);
            final String escapeProcessing = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, SDBCReportDataFactory.ESCAPE_PROCESSING);
            report.setQuery(command);
            parameters.put(SDBCReportDataFactory.COMMAND_TYPE, commandType);
            parameters.put(SDBCReportDataFactory.ESCAPE_PROCESSING,Boolean.valueOf(!("false".equals(escapeProcessing))));
           
            final String filter = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, "filter");
            parameters.put(SDBCReportDataFactory.UNO_FILTER, filter);

            parameters.put(ReportEngineParameterNames.MAXROWS, report.getJobProperties().getProperty(ReportEngineParameterNames.MAXROWS));
           
            final long startTime = System.currentTimeMillis();
View Full Code Here

            final Node[] nodes = report.getNodeArray();

            final FormulaParser parser = new FormulaParser();
            final ArrayList expressions = new ArrayList();
            final OfficeReport officeReport = (OfficeReport) ((Section) nodes[0]).getNode(0);
            final Section reportBody = (Section) officeReport.getBodySection();
            collectGroupExpressions(reportBody.getNodeArray(), expressions, parser, officeReport.getExpressions());
            parameters.put(SDBCReportDataFactory.GROUP_EXPRESSIONS, expressions);
            final String command = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, "command");
            final String commandType = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, SDBCReportDataFactory.COMMAND_TYPE);
            final String escapeProcessing = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, SDBCReportDataFactory.ESCAPE_PROCESSING);
            report.setQuery(command);
            parameters.put(SDBCReportDataFactory.COMMAND_TYPE, commandType);
            parameters.put(SDBCReportDataFactory.ESCAPE_PROCESSING, !("false".equals(escapeProcessing)));

            final String filter = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, "filter");
            parameters.put(SDBCReportDataFactory.UNO_FILTER, filter);

            parameters.put(ReportEngineParameterNames.MAXROWS, report.getJobProperties().getProperty(ReportEngineParameterNames.MAXROWS));

            final long startTime = System.currentTimeMillis();
View Full Code Here

     */
    protected LayoutController processContent(final ReportTarget target)
            throws DataSourceException, ReportProcessingException,
            ReportDataFactoryException
    {
        final OfficeReport or = (OfficeReport) getElement();

        switch (state)
        {
            case OfficeReportLayoutController.STATE_NOT_STARTED:
            {
                return delegateToTemplates(OfficeReportLayoutController.STATE_TEMPLATES);
            }
            case OfficeReportLayoutController.STATE_TEMPLATES:
            {
                return delegateSection(or.getPageHeader(),
                        OfficeReportLayoutController.STATE_PAGE_HEADER_DONE);
            }
            case OfficeReportLayoutController.STATE_PAGE_HEADER_DONE:
            {
                return delegateSpreadsheetSection(or.getPageHeader(),
                        OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_HEADER_DONE);
            }
            case OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_HEADER_DONE:
            {
                return delegateSection(or.getPageFooter(),
                        OfficeReportLayoutController.STATE_PAGE_FOOTER_DONE);
            }
            case OfficeReportLayoutController.STATE_PAGE_FOOTER_DONE:
            {
                return delegateSection(or.getColumnHeader(),
                        OfficeReportLayoutController.STATE_COLUMN_HEADER_DONE);
            }
            case OfficeReportLayoutController.STATE_COLUMN_HEADER_DONE:
            {
                return delegateSection(or.getColumnFooter(),
                        OfficeReportLayoutController.STATE_COLUMN_FOOTER_DONE);
            }
            case OfficeReportLayoutController.STATE_COLUMN_FOOTER_DONE:
            {
                return delegateSection(new VariablesDeclarationSection(),
                        OfficeReportLayoutController.STATE_INITIAL_VARIABLES_DONE);
            }
            case OfficeReportLayoutController.STATE_INITIAL_VARIABLES_DONE:
            {
                return delegateSection(or.getReportHeader(),
                        OfficeReportLayoutController.STATE_REPORT_HEADER_DONE);
            }
            case OfficeReportLayoutController.STATE_REPORT_HEADER_DONE:
            {
                return delegateSection(or.getBodySection(),
                        OfficeReportLayoutController.STATE_REPORT_BODY_DONE);
            }
            case OfficeReportLayoutController.STATE_REPORT_BODY_DONE:
            {
                return delegateSection(new VariablesDeclarationSection(),
                        OfficeReportLayoutController.STATE_REPORT_FOOTER_VARIABLES);
            }
            case OfficeReportLayoutController.STATE_REPORT_FOOTER_VARIABLES:
            {
                return delegateSection(or.getReportFooter(),
                        OfficeReportLayoutController.STATE_REPORT_FOOTER_DONE);
            }
            case OfficeReportLayoutController.STATE_REPORT_FOOTER_DONE:
            {
                return delegateSpreadsheetSection(or.getPageFooter(),
                        OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_FOOTER_DONE);
            }
            case OfficeReportLayoutController.STATE_SPREADSHEET_PAGE_FOOTER_DONE:
            {
                final OfficeReportLayoutController olc = (OfficeReportLayoutController) clone();
View Full Code Here

    private final List postBodyHandlers;
    private boolean pre = true;

    public ReportReadHandler()
    {
        rootSection = new OfficeReport();
        rootSection.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, "simple-report-structure", Boolean.TRUE);
        functionHandlers = new ArrayList();
        preBodyHandlers = new ArrayList();
        postBodyHandlers = new ArrayList();
    }
View Full Code Here

TOP

Related Classes of com.sun.star.report.pentaho.model.OfficeReport

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.