2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 By: tnsantos - tnsantos Error generating PDF 2004-12-30 05:31 When I use the folowing lines... byte[] bytes = JasperRunManager.runReportToPdf(jasperReport, parametros, conexao); if (bytes != null && bytes.length > 0) { response.setContentType("application/pdf"); response.setHeader("Cache-Control", ""); response.setHeader("Pragma", ""); response.setHeader("Content-disposition", "inline; filename=relatorio.pdf"); response.setContentLength(bytes.length); response.getOutputStream().write(bytes, 0, bytes.length); response.getOutputStream().flush(); response.getOutputStream().close(); ... I get this error only on Internet Explorer (on netscape/mozilla it works) java.sql.SQLException: ORA-00936: missing expression And when I comment the lines that set the content type and headers, it works on internet explorer, but not the way I want. I want to show the pdf in the browser popup, not opening the dialog for the user choose where to save it or just open the file. What's wrong? Ty for ur help. By: Mike Warne - mwarne RE: Error generating PDF 2004-12-30 13:17 Have you checked the parameters sent to the report using IE vs Firefox etc? Maybe they are escaped differently, and causing SQL problems with oracle. I think your problem is not producing the pdf, but with your parameters sent to the report.. Mike. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now