Hi can you place to code how your generating report from java like there are 2-3 different approach of creating report from jrxml.. 1. JasperPrint jasperPrint = new JasperPrint(); Connection conn = null; Map inputParameters = new HashMap(); inputParameters.put("sometitle","first report"); conn = your database connection you get from your driver (using jt400) JasperReport jasperReport = JasperCompileManager.compileReport("input.jrxml"); jasperPrint = JasperFillManager.fillReport(jasperReport, inputParameters, conn); // for a pdf JasperExportManager.exportReportToPdfFile(jasperPrint, outputFile.pdf); or 2. String path = request.getRealPath("jasper"); path = path + "/AgingReportForCoverageArea.jasper"; HashMap map = new HashMap(); JasperPrint jasperPrint = JasperFillManager.fillReport(path, map, connectDB()); //Block to check viewer selected String viewer = request.getParameter("viewType"); if(viewer.equalsIgnoreCase("0")){ // Open report in HTML response.setContentType("text/html"); JRHtmlExporter exporter = new JRHtmlExporter(); exporter = new JRHtmlExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER,response.getWriter()); request.getSession().setAttribute( ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE,jasperPrint); exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, new HashMap()); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,request.getContextPath() + "/images?image="); // In This "images" is name of folder which contain images exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME,request.getRealPath("images")); exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR,true); exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND,true); exporter.exportReport(); }else{ // Open report in PDF response.setContentType("application/pdf"); JRPdfExporter exporter = new JRPdfExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,response.getOutputStream()); exporter.exportReport(); } cause compiling jrxml in java code itself every time when running report might use you memory and make ur application slow