Package net.sf.jasperreports.engine

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


                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

                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

                              
                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

    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

            // 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

    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

            e.printStackTrace();
        }
    }

    private JRDataSource createDataSource() {
        return new JREmptyDataSource(4);
    }
View Full Code Here

                if (UtilValidate.isNotEmpty(datasourceName)) {
                    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

            PipedInputStream fillToPrintInputStream = new PipedInputStream(fillToPrintOutputStream);

            if (UtilValidate.isNotEmpty(datasourceName)) {
                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

TOP

Related Classes of net.sf.jasperreports.engine.JREmptyDataSource

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.