madhan1kumar Posted April 13, 2017 Share Posted April 13, 2017 I have built jasper reports and able to show the reports on web page as PDF content. But I wanted to provide export functionality to xls,cvs etc what a JasperViewer(Swing) one provides. Do we have simialiar class for webapplication where I can JasperPrint and get displayed on the page. Purpose of this request to have JasperViewer equivalent is to achieve export functionality for my report(this is supported in JasperViewer). Im using below code in jsp now,<%InputStream inputStream = this.getClass().getResourceAsStream(request.getAttribute("filename")+"");JasperDesign jasperDesign = JRXmlLoader.load(inputStream);JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,(HashMap<String, Object>)request.getAttribute("params"), (JRBeanCollectionDataSource)request.getAttribute("beanColDataSource"));JasperViewer.viewReport(jasperPrint);%> But this opens JasperViewer swing UI. Link to comment Share on other sites More sharing options...
hozawa Posted April 13, 2017 Share Posted April 13, 2017 JasperReports Server already has a button to export to csv, excel and other formats you've mentioned.http://community.jaspersoft.com/documentation/tibco-jasperreports-server-user-guide/v630/exporting-report Link to comment Share on other sites More sharing options...
madhan1kumar Posted April 14, 2017 Author Share Posted April 14, 2017 @Hozawa Could you share examples I can refer. Im not using Jasper report server now. Should I move to Jasper server? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now