Hello all,
i'm trying to build a custom servlet that renders for export a pdf or show the crystal report viewer.
The Pdf export work pretty well, calling the url with parameters will return the pdf.
But when I try to show the crystal report viewer I have a blank page, no errors are logged in the console.
This is my environment:
eclipse 2018-09
Java 1.8.0.191
Tomcat 8.5
This is the code I use in the servlet:
session.setAttribute("reportSource", (Object)reportSource);
ServletContext context = request.getSession().getServletContext();
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setReportSource(reportSource);
viewer.setOwnPage(true);
viewer.processHttpRequest(request, response, context,response.getWriter());
response.getOutputStream().flush();
response.getOutputStream().close();
The result is a complete blank page.
Any help is very appreciated