Examples of JRDataSource


Examples of net.sf.jasperreports.engine.JRDataSource

            Map parameters = (Map) request.getAttribute("jrParameters");
            if (parameters == null) {
                parameters = UtilHttp.getParameterMap(request);
            }

            JRDataSource jrDataSource = (JRDataSource) request.getAttribute("jrDataSource");
            JasperPrint jp = null;
            if (jrDataSource == null) {
                String datasourceName = delegator.getEntityHelperName(info);
                if (datasourceName != null && datasourceName.length() > 0) {
                    Debug.logInfo("Filling report with connection from datasource: " + datasourceName, module);
View Full Code Here

Examples of net.sf.jasperreports.engine.JRDataSource

            Map parameters = (Map) request.getAttribute("jrParameters");
            if (parameters == null) {
                parameters = UtilHttp.getParameterMap(request);
            }

            JRDataSource jrDataSource = (JRDataSource) request.getAttribute("jrDataSource");
            JasperPrint jp = null;
            if (jrDataSource == null) {
                String datasourceName = delegator.getEntityHelperName(info);
                if (datasourceName != null && datasourceName.length() > 0) {
                    Debug.logInfo("Filling report with connection from datasource: " + datasourceName, module);
View Full Code Here

Examples of net.sf.jasperreports.engine.JRDataSource

    if (report == null) {
      throw new IllegalStateException("No main report defined for 'fillReport' - " +
          "specify a 'url' on this view or override 'getReport()' or 'fillReport(Map)'");
    }

    JRDataSource jrDataSource = null;
    DataSource jdbcDataSourceToUse = null;

    // Try model attribute with specified name.
    if (this.reportDataKey != null) {
      Object reportDataValue = model.get(this.reportDataKey);
View Full Code Here

Examples of net.sf.jasperreports.engine.JRDataSource

            ReportResourceSupplierClient resourceSupplierClient = new ReportResourceSupplierClient(cookie,
                    serverURL, configurationContext);

            List<ReportDataManager> reportDataList = (List<ReportDataManager>) reportDataObject;
            String reportResource = resourceSupplierClient.getReportResources(component, template);
            JRDataSource jrDataSource = new JRBeanCollectionDataSource(reportDataList);
            JasperPrintProvider jasperPrintProvider = new JasperPrintProvider();
            JasperPrint jasperPrint = jasperPrintProvider.createJasperPrint(jrDataSource ,reportResource, new ReportParamMap[0]);
            request.getSession().setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE,jasperPrint);
            ReportStream reportStream = new ReportStream();
            ByteArrayOutputStream outputStream =  reportStream.getReportStream(jasperPrint,generateType);
View Full Code Here

Examples of net.sf.jasperreports.engine.JRDataSource

            ReportResourceSupplierClient resourceSupplierClient = new ReportResourceSupplierClient(cookie,
                    serverURL, configurationContext);

            List<ReportDataManager> reportDataList = (List<ReportDataManager>) reportDataObject;
            String reportResource = resourceSupplierClient.getReportResources(component, template);
            JRDataSource jrDataSource = new JRBeanCollectionDataSource(reportDataList);
            JasperPrintProvider jasperPrintProvider = new JasperPrintProvider();
            JasperPrint jasperPrint = jasperPrintProvider.createJasperPrint(jrDataSource ,reportResource, new ReportParamMap[0]);
            request.getSession().setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE,jasperPrint);
            ReportStream reportStream = new ReportStream();
            ByteArrayOutputStream outputStream =  reportStream.getReportStream(jasperPrint,type);
View Full Code Here

Examples of net.sf.jasperreports.engine.JRDataSource

    if (report == null) {
      throw new IllegalStateException("No main report defined for 'fillReport' - " +
          "specify a 'url' on this view or override 'getReport()' or 'fillReport(Map)'");
    }

    JRDataSource jrDataSource = null;
    DataSource jdbcDataSourceToUse = null;

    // Try model attribute with specified name.
    if (this.reportDataKey != null) {
      Object reportDataValue = model.get(this.reportDataKey);
View Full Code Here

Examples of net.sf.jasperreports.engine.JRDataSource

    if (report == null) {
      throw new IllegalStateException("No main report defined for 'fillReport' - " +
          "specify a 'url' on this view or override 'getReport()' or 'fillReport(Map)'");
    }

    JRDataSource jrDataSource = null;
    DataSource jdbcDataSourceToUse = null;

    // Try model attribute with specified name.
    if (this.reportDataKey != null) {
      Object reportDataValue = model.get(this.reportDataKey);
View Full Code Here

Examples of net.sf.jasperreports.engine.JRDataSource

      throw new IllegalStateException("No main report defined for 'fillReport' - " +
          "specify a 'url' on this view or override 'getReport()' or 'fillReport(Map)'");
    }

    // Determine JRDataSource for main report.
    JRDataSource jrDataSource = getReportData(model);
    if (jrDataSource != null) {
      // Use the JasperReports JRDataSource.
      if (logger.isDebugEnabled()) {
        logger.debug("Filling report with JRDataSource [" + jrDataSource + "].");
      }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRDataSource

      throw new IllegalStateException("No main report defined for 'fillReport' - " +
          "specify a 'url' on this view or override 'getReport()' or 'fillReport(Map)'");
    }

    // Determine JRDataSource for main report.
    JRDataSource jrDataSource = getReportData(model);
    if (jrDataSource != null) {
      // Use the JasperReports JRDataSource.
      if (logger.isDebugEnabled()) {
        logger.debug("Filling report with JRDataSource [" + jrDataSource + "].");
      }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRDataSource

                orderItems.addAll(orderShipment.getOrderItems());
            }
           
            // TODO : denis : one page/table by OrderShipment
           
            JRDataSource datasource = new JRBeanCollectionDataSource(orderItems, true);
           
            final JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, datasource);
           
            String fullFilePath = getOrderConfirmationFilePath(order);
            JasperExportManager.exportReportToPdfFile(jasperPrint, fullFilePath);
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.