Hi,
Every report that I export in my servlet app will have the filename of the java class file plus the pdf extension, for example, the page "printreport" will generate "printreport.pdf", how can I rename the outputted file?
This is my code, which does not change the filename right now:
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(reportname, OpenReportOptions._openAsReadOnly);
Object reportSource = reportClientDoc.getReportSource();
...
...
response.reset();
response.setContentType("application/pdf");
response.addHeader("content-disposition", "inline; filename=MyCustomReportName.pdf");
response.addHeader("Content-Disposition", "attachment;.filename=MyCustomReportName.pdf");
response.flushBuffer();
exportControl.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
Thank you!