Examples of JREmptyDataSource


Examples of net.sf.jasperreports.engine.JREmptyDataSource

   */
  public void fill() throws JRException
  {
    long start = System.currentTimeMillis();
    Map params = new HashMap();
    params.put("TableDataSource", new JREmptyDataSource(50));
    JasperFillManager.fillReportToFile("build/reports/TableReport.jasper", params);
    System.err.println("Filling time : " + (System.currentTimeMillis() - start));
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JREmptyDataSource

   *
   */
  public void fill() throws JRException
  {
    long start = System.currentTimeMillis();
    JasperFillManager.fillReportToFile("build/reports/StretchReport.jasper", null, new JREmptyDataSource(20));
    System.err.println("Filling time : " + (System.currentTimeMillis() - start));
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JREmptyDataSource

            PipedInputStream fillToPrintInputStream = new PipedInputStream(fillToPrintOutputStream);

            if (datasourceName != null && datasourceName.length() > 0) {
                JasperFillManager.fillReportToStream(report, fillToPrintOutputStream, parameters, ConnectionFactory.getConnection(datasourceName));
            } else {
                JasperFillManager.fillReportToStream(report, fillToPrintOutputStream, parameters, new JREmptyDataSource());
            }
            JasperExportManager.exportReportToXmlStream(fillToPrintInputStream, response.getOutputStream());
        } catch (IOException ie) {
            throw new ViewHandlerException("IO Error in region", ie);
        } catch (java.sql.SQLException e) {
View Full Code Here

Examples of net.sf.jasperreports.engine.JREmptyDataSource

                if (datasourceName != null && datasourceName.length() > 0) {
                    Debug.logInfo("Filling report with connection from datasource: " + datasourceName, module);
                    jp = JasperFillManager.fillReport(report, parameters, ConnectionFactory.getConnection(datasourceName));
                } else {
                    Debug.logInfo("Filling report with an empty JR datasource", module);
                    jp = JasperFillManager.fillReport(report, parameters, new JREmptyDataSource());
                }
            } else {
                Debug.logInfo("Filling report with a passed in jrDataSource", module);
                jp = JasperFillManager.fillReport(report, parameters, jrDataSource);
            }
View Full Code Here

Examples of net.sf.jasperreports.engine.JREmptyDataSource

                if (datasourceName != null && datasourceName.length() > 0) {
                    Debug.logInfo("Filling report with connection from datasource: " + datasourceName, module);
                    jp = JasperFillManager.fillReport(report, parameters, ConnectionFactory.getConnection(datasourceName));
                } else {
                    Debug.logInfo("Filling report with an empty JR datasource", module);
                    jp = JasperFillManager.fillReport(report, parameters, new JREmptyDataSource());
                }
            } else {
                Debug.logInfo("Filling report with a passed in jrDataSource", module);
                jp = JasperFillManager.fillReport(report, parameters, jrDataSource);
            }
View Full Code Here

Examples of net.sf.jasperreports.engine.JREmptyDataSource

                if (datasourceName != null && datasourceName.length() > 0) {
                    Debug.logInfo("Filling report with connection from datasource: " + datasourceName, module);
                    jp = JasperFillManager.fillReport(report, parameters, ConnectionFactory.getConnection(datasourceName));
                } else {
                    Debug.logInfo("Filling report with an empty JR datasource", module);
                    jp = JasperFillManager.fillReport(report, parameters, new JREmptyDataSource());
                }
            } else {
                Debug.logInfo("Filling report with a passed in jrDataSource", module);
                jp = JasperFillManager.fillReport(report, parameters, jrDataSource);
            }
View Full Code Here

Examples of net.sf.jasperreports.engine.JREmptyDataSource

                              
                jp = JasperFillManager.fillReport(jr, jasperReportMap);              
            }
            else if (dataSource == null)
      {       
        jp = JasperFillManager.fillReport(jr, jasperReportMap, new JREmptyDataSource());
      }
      else
      {
        conn = dataSourceProvider.getConnection(dataSource.getId());
        jp = JasperFillManager.fillReport(jr, jasperReportMap, conn);
View Full Code Here

Examples of net.sf.jasperreports.engine.JREmptyDataSource

    try
    {
      long start = System.currentTimeMillis();
      if (TASK_FILL.equals(taskName))
      {
        JasperFillManager.fillReportToFile(fileName, null, new JREmptyDataSource());
        System.err.println("Filling time : " + (System.currentTimeMillis() - start));
        System.exit(0);
      }
      else if (TASK_PDF.equals(taskName))
      {
View Full Code Here

Examples of net.sf.jasperreports.engine.JREmptyDataSource

            // Obtendo o stream do relatório.
            InputStream reportInputStream = ResourceUtils.locateAsInputStream(reportFile.getPath());
            // Utilizando o stream para gerar o arquivo base do relatório
            // (jasperPrint).
            jasperPrint = JasperFillManager.fillReport(reportInputStream,
                    reportFile.getFillParams(), new JREmptyDataSource());
        } catch (JRException e) {
            throw new ReportFileManagerException(msgErro, e);
        }
        return jasperPrint;
    }
View Full Code Here

Examples of net.sf.jasperreports.engine.JREmptyDataSource

    parameters.put("ReportTitle", "Address Report");
    parameters.put("DataFile", "CustomDataSource from java");

    // report.setSrc("/userguide/data/jasperreport.jasper");
    report.setParameters(parameters);
    report.setDatasource(new JREmptyDataSource());
    // report.setType((String) format.getSelectedItem().getValue());

  }
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.