Jump to content
We've recently updated our Privacy Statement, available here ×

Error generating PDF


2005 IR Help

Recommended Posts

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...