File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes JasperReports - Is connection always required? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JasperReports - Is connection always required?" Watch "JasperReports - Is connection always required?" New topic
Author

JasperReports - Is connection always required?

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
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!


SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
Where does a Connection object come into play? I see nothing in the code that mentions anything about that.


Ping & DNS - updated with new look and Ping home screen widget
 
Don't get me started about those stupid light bulbs.
 
subject: JasperReports - Is connection always required?
 
Similar Threads
Jasper Report
Jasper Report Design Problem
Creating a custom datasource in Jasper Reports and iReport
Jasper Report. Problem in html print preview of graphical element
Jasper and Eclipse