Examples of JasperPrintProvider


Examples of org.wso2.carbon.reporting.util.JasperPrintProvider

        try {
            template = supplier.getReportResources(null, templateName);
        } catch (ReportingException e) {
            throw new ReportingException("Failed get template " + templateName, e);
        }
        JasperPrintProvider jasperPrintProvider = new JasperPrintProvider();

        ReportDataSourceManager reportDataSourceManager = new ReportDataSourceManager();
        Connection connection;
        if (template != null) {
            connection = reportDataSourceManager.getJDBCConnection(dataSourceName);
        } else {
            throw new ReportingException("empty report template found :" + templateName);
        }
        JasperPrint jasperPrint;
        if (connection != null) {
            try {
                jasperPrint = jasperPrintProvider.createJasperPrint(connection, template, reportParamMap);
            } catch (JRException e) {
                throw new JRException("Can't create JasperPrint Object from " + templateName, e);
            }
        } else {
            throw new ReportingException("valid data source not found  " + dataSourceName);
View Full Code Here

Examples of org.wso2.carbon.reporting.util.JasperPrintProvider

                    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);
            ServletOutputStream servletOutputStream = response.getOutputStream();
            try{
View Full Code Here

Examples of org.wso2.carbon.reporting.util.JasperPrintProvider

                    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);
            ServletOutputStream servletOutputStream = response.getOutputStream();
            try{
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.