Crsytal reports is too slow in JAVA when executing method processHttpRequest (Tomcat 9, Java 13).
With slow I mean that one report un Cristal editor takes approx 5 minutes to show it. When you execute it in crystal reports visor it takes more than 45 minutes. When I execute for second time there’s a difference of 2-3 minutes. I don’t understand why there’s too many difference between editor vs visor for eclipse.
Note: This report have approx 400 pages
My code:
Fields fields = (Fields) request.getSession().getAttribute("fields"); String separarPaginasReporte = request.getParameter("separarPaginasReporte"); //String separarPaginasReporte = (String) request.getSession().getAttribute("separarPaginasReporte"); IReportSource reportSource = (IReportSource) request.getSession().getAttribute("reportSource"); //create the CrystalReportViewer object CrystalReportViewer oCrystalReportViewer = new CrystalReportViewer(); //set the reportsource property of the viewer oCrystalReportViewer.setParameterFields(fields); oCrystalReportViewer.setReportSource(reportSource); //set viewer attributes oCrystalReportViewer.setOwnPage(true); oCrystalReportViewer.setOwnForm(true); oCrystalReportViewer.setDisplayGroupTree(false); oCrystalReportViewer.setEnableDrillDown(false); oCrystalReportViewer.setHasLogo(false); oCrystalReportViewer.setSeparatePages((request.getParameter("separarPaginasReporte") != null && request.getParameter("separarPaginasReporte").equalsIgnoreCase("N")) ? false : true); oCrystalReportViewer.setHasToggleGroupTreeButton(false); oCrystalReportViewer.setHasToggleParameterPanelButton(false); //set the CrystalReportViewer print mode oCrystalReportViewer.setPrintMode(CrPrintMode.ACTIVEX); oCrystalReportViewer.processHttpRequest(request, response,getServletConfig().getServletContext(), null); reportSource.dispose(); request.getSession().setAttribute("fields",null); request.getSession().setAttribute("reportSource",null);