Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JasperReports - Is connection always required?

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use

JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream() );

and according to the API it doesn't need a Connection object. I'm using this altogether with JSF and getting the outputstream is no problem. However, when I open the generated PDF file it doesn't contain anything!

Here is the code




Everything is printed up to the "Closing stream..." stream part and doesn't generated anywhere before that. I'm totally clueless since ever I'm new with Jasper reports. It looks fine with iReport and I get my desired output there, just not from the java code above. Here is the jrxml file. I use the compiled one though.



Thanks for your help!
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where does a Connection object come into play? I see nothing in the code that mentions anything about that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic