Hi!, i'm working with jasperreports-1.2.1 library, and i have developed a report that works fine with Acrobat 7.0 but with Acrobat 6.0 it don't work.
Somebody knows the problem?. Thank you.
Somebody knows the problem?. Thank you.
5 Answers:
Posted on September 27, 2006 at 1:23pm
Ok, excuse me, i might have detailed more my problem. I execute my report from a servlet, and i set the content type to "application/pdf". Then, from my Jsp page i open a window that call to servlet and display the report in PDF format. I have installed Acrobat 7.0 and it works correctly, i can see my report, but when i try it in other machine that it has installed Acrobat 6.0 or less, it don't work, the report is blank, and it don't give me any exception.
I don't know if i explain me better, my english isn't good.
Thanks.
Post edited by: pajarokillo, at: 2006/09/27 13:25
I don't know if i explain me better, my english isn't good.
Thanks.
Post edited by: pajarokillo, at: 2006/09/27 13:25
Posted on September 28, 2006 at 8:52am
yes, i had already exported to a in-memory buffer and set the content length for the response, my portion of code when i do that is the following:
byte[] bytes = null;
bytes = report.getReport();
if(bytes != null && bytes.length > 0){
response.setContentType("application/pdf");
response.setContentLength(bytes.length);
ServletOutputStream outputStream = response.getOutputStream();
outputStream.write(bytes,0,bytes.length);
outputStream.flush();
outputStream.close();
byte[] bytes = null;
bytes = report.getReport();
if(bytes != null && bytes.length > 0){
response.setContentType("application/pdf");
response.setContentLength(bytes.length);
ServletOutputStream outputStream = response.getOutputStream();
outputStream.write(bytes,0,bytes.length);
outputStream.flush();
outputStream.close();