pankajnain87 Posted January 22, 2018 Share Posted January 22, 2018 I am creating a report in Jasper Studio. I am using XML datasource to fill the report. It takes 22 secs to fill the report using JasperStudio report preview feature but it takes 4 minutes to create pdf file on the server.I am using .Net to fill report.Below is the code sample which is used to fill report and export pdf.pars.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, document); pars.put(JRXPathQueryExecuterFactory.XML_DATE_PATTERN, "yyyy-MM-dd"); pars.put(JRXPathQueryExecuterFactory.XML_NUMBER_PATTERN, "#,##0.##"); pars.put(JRXPathQueryExecuterFactory.XML_LOCALE, Locale.ENGLISH); DefaultJasperReportsContext context = DefaultJasperReportsContext.getInstance(); JRPropertiesUtil.getInstance(context).setProperty("net.sf.jasperreports.xpath.executer.factory", "net.sf.jasperreports.engine.util.xml.JaxenXPathExecuterFactory"); JasperFillManager jasperFillManager = JasperFillManager.getInstance(context); JasperPrint jasperPrint = jasperFillManager.fill(report_path + template, pars); JasperExportManager.exportReportToPdfFile(jasperPrint, saveLocation); Link to comment Share on other sites More sharing options...
hozawa Posted January 22, 2018 Share Posted January 22, 2018 It may be that your server is low in memory. From my experience, JasperReports Server requires at least 8GB memory. 16GB is preferred. Link to comment Share on other sites More sharing options...
pankajnain87 Posted January 23, 2018 Author Share Posted January 23, 2018 Server has 16 GB RAM and is 2.60 GHz. It doesnt seems like server issue. Link to comment Share on other sites More sharing options...
CaPsLoCkEr Posted January 23, 2018 Share Posted January 23, 2018 Do you have this with other reports as well? Link to comment Share on other sites More sharing options...
pankajnain87 Posted January 23, 2018 Author Share Posted January 23, 2018 Yes this is happening for all the reports where XML has considerable amount of data. Link to comment Share on other sites More sharing options...
CaPsLoCkEr Posted January 23, 2018 Share Posted January 23, 2018 Have you simply tried to restart the jasperreport server? Link to comment Share on other sites More sharing options...
hozawa Posted January 23, 2018 Share Posted January 23, 2018 If xml is large, JasperReports require time to load and process the xml file.I've found csv and database connection to be faster than other data types. 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