Package org.jfree.report.flow

Examples of org.jfree.report.flow.DefaultReportJob


     * single threaded environments.
     */
    public void execute()
            throws ReportExecutionException, IOException
    {
        final DefaultReportJob job = new DefaultReportJob(report);
        setMetaDataProperties(job);
        final String contentType = (String) jobProperties.getProperty(ReportEngineParameterNames.CONTENT_TYPE);
        //noinspection OverlyBroadCatchBlock
        try
        {
            final ReportParameters parameters = job.getParameters();

            if (masterValues != null && detailColumns != null)
            {
                parameters.put(SDBCReportDataFactory.MASTER_VALUES, masterValues);
                parameters.put(SDBCReportDataFactory.DETAIL_COLUMNS, detailColumns);
            }

            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);
            job.close();
            final long endTime = System.currentTimeMillis();
            LOGGER.debug("Report processing time: " + (endTime - startTime));
        }
        catch (final Exception e)
        {
View Full Code Here


     * single threaded environments.
     */
    public void execute()
            throws ReportExecutionException, IOException
    {
        final DefaultReportJob job = new DefaultReportJob(report);
        setMetaDataProperties(job);
        final String contentType = (String) jobProperties.getProperty(ReportEngineParameterNames.CONTENT_TYPE);
        //noinspection OverlyBroadCatchBlock
        try
        {
            final ReportParameters parameters = job.getParameters();

            if (masterValues != null && detailColumns != null)
            {
                parameters.put(SDBCReportDataFactory.MASTER_VALUES, masterValues);
                parameters.put(SDBCReportDataFactory.DETAIL_COLUMNS, detailColumns);
            }

            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();
            final ReportProcessor rp = getProcessorForContentType(contentType);
            rp.processReport(job);
            job.close();
            final long endTime = System.currentTimeMillis();
            LOGGER.debug("Report processing time: " + (endTime - startTime));
        }
        catch (final Exception e)
        {
View Full Code Here

     * single threaded environments.
     */
    public void execute()
            throws ReportExecutionException, IOException
    {
        final DefaultReportJob job = new DefaultReportJob(report);
        setMetaDataProperties(job);
        final String contentType = (String) jobProperties.getProperty(ReportEngineParameterNames.CONTENT_TYPE);
        //noinspection OverlyBroadCatchBlock
        try
        {
            final ReportParameters parameters = job.getParameters();

            if (masterValues != null && detailColumns != null)
            {
                parameters.put(SDBCReportDataFactory.MASTER_VALUES, masterValues);
                parameters.put(SDBCReportDataFactory.DETAIL_COLUMNS, detailColumns);
            }

            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();
            final ReportProcessor rp = getProcessorForContentType(contentType);
            rp.processReport(job);
            job.close();
            final long endTime = System.currentTimeMillis();
            LOGGER.debug("Report processing time: " + (endTime - startTime));
        }
        catch (final Exception e)
        {
View Full Code Here

     * single threaded environments.
     */
    public void execute()
            throws ReportExecutionException, IOException
    {
        final DefaultReportJob job = new DefaultReportJob(report);
        setMetaDataProperties(job);
        final String contentType = (String) jobProperties.getProperty(ReportEngineParameterNames.CONTENT_TYPE);
        //noinspection OverlyBroadCatchBlock
        try
        {
            final ReportParameters parameters = job.getParameters();

            if (masterValues != null && detailColumns != null)
            {
                parameters.put(SDBCReportDataFactory.MASTER_VALUES, masterValues);
                parameters.put(SDBCReportDataFactory.DETAIL_COLUMNS, detailColumns);
            }

            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();
            final ReportProcessor rp = getProcessorForContentType(contentType);
            rp.processReport(job);
            job.close();
            final long endTime = System.currentTimeMillis();
            LOGGER.debug("Report processing time: " + (endTime - startTime));
        }
        catch (final Exception e)
        {
View Full Code Here

     * single threaded environments.
     */
    public void execute()
            throws ReportExecutionException, IOException
    {
        final DefaultReportJob job = new DefaultReportJob(report);
        setMetaDataProperties(job);
        final String contentType = (String) jobProperties.getProperty(ReportEngineParameterNames.CONTENT_TYPE);
        //noinspection OverlyBroadCatchBlock
        try
        {
            final ReportParameters parameters = job.getParameters();

            if (masterValues != null && detailColumns != null)
            {
                parameters.put(SDBCReportDataFactory.MASTER_VALUES, masterValues);
                parameters.put(SDBCReportDataFactory.DETAIL_COLUMNS, detailColumns);
            }

            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);
            report.setQuery(command);
            parameters.put(SDBCReportDataFactory.COMMAND_TYPE, commandType);
           
            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);
            job.close();
            final long endTime = System.currentTimeMillis();
            Log.debug("Report processing time: " + (endTime - startTime));
        }
        catch (final Exception e)
        {
View Full Code Here

   * single threaded environments.
   */
  public void execute ()
          throws ReportExecutionException, IOException
  {
    final DefaultReportJob job = new DefaultReportJob(report);

    final String contentType = (String)
            jobProperties.getProperty(ReportEngineParameterNames.CONTENT_TYPE);
    //noinspection OverlyBroadCatchBlock
    try
    {
      final long startTime = System.currentTimeMillis();
      final ReportProcessor rp = getProcessorForContentType(contentType);
      rp.processReport(job);
      job.close();
      final long endTime = System.currentTimeMillis();
      Log.debug ("Report processing time: "  + (endTime - startTime));
    }
    catch (final Exception e)
    {
View Full Code Here

     * single threaded environments.
     */
    public void execute()
            throws ReportExecutionException, IOException
    {
        final DefaultReportJob job = new DefaultReportJob(report);
        setMetaDataProperties(job);
        final String contentType = (String) jobProperties.getProperty(ReportEngineParameterNames.CONTENT_TYPE);
        //noinspection OverlyBroadCatchBlock
        try
        {
            final ReportParameters parameters = job.getParameters();

            if (masterValues != null && detailColumns != null)
            {
                parameters.put(SDBCReportDataFactory.MASTER_VALUES, masterValues);
                parameters.put(SDBCReportDataFactory.DETAIL_COLUMNS, detailColumns);
            }

            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();
            final ReportProcessor rp = getProcessorForContentType(contentType);
            rp.processReport(job);
            job.close();
            final long endTime = System.currentTimeMillis();
            LOGGER.debug("Report processing time: " + (endTime - startTime));
        }
        catch (final Exception e)
        {
View Full Code Here

TOP

Related Classes of org.jfree.report.flow.DefaultReportJob

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.