2001 JI Open Discussion Posted August 17, 2006 Share Posted August 17, 2006 By: Outey Ky - chhunak Advice on Using JasperReport in Production 2002-10-30 13:34My reports are coming nicely together. I am beginning to appreciate more and more of the JasperReports APIs and build tools used to create the XML files such as JasperEdit, JasperDesign, and IReport. Now, that I have created my reports and does not care too much about the output format except the look and feel, but also having simultaneous clients running the report from my web application--I am using MVC in my design. What's the most efficient way to output my reports. If I put the output pdf or html files on the server will the clients run into input/output problems, and etc? I am developing on Windows and will deploy to a Sun Solaris unix environment on production. Thanks, and any suggestions and advices are welcome. By: Teodor Danciu - teodord RE: Advice on Using JasperReport in Production 2002-10-30 13:50 Hi, When producing PDF content, there is no problem, because you can send the bytes directly to the browser, using the response output stream. The problem is with HTML, since there is a HTML file and a directory containing the images that you have to save on disk and then redirect the browser to view them from that location. The only solution that I see for concurrent access is to create temporary directories based on the http session id and store the HTML reports there. This way you make sure every user will only see the reports he has generated himself, and not others people reports. The only problem with this is that you have to create some directory garbage collector that deletes these temporary directories once they are not used anymore. I hope this helps. Teodor By: Martin Phee - mphee RE: Advice on Using JasperReport in Productio 2002-10-30 13:54I derived a new class from the HTML exporter which returns to me a byte[]. This way I can just send that to the browser. Now the problem is formating the report for html output. Doesn't look as nice as pdf. By: Teodor Danciu - teodord RE: Advice on Using JasperReport in Productio 2002-10-30 14:15 Hi, The built-in HTML exporter uses a 1 pixel transparent GIF to align elements on the page, so they look exactly like the PDF. I'm not sure you can embed images in HTML, in order to stream them along with the HTML code. If you find a solution, I'll be happy to hear it. Thank you, Teodor By: Martin Phee - mphee RE: Advice on Using JasperReport in Productio 2002-10-30 21:22I had to take that image and put it into my images directory. By: Martin Phee - mphee RE: Advice on Using JasperReport in Productio 2002-10-30 21:21I derived a new class from the HTML exporter which returns to me a byte[]. This way I can just send that to the browser. Now the problem is formating the report for html output. Doesn't look as nice as pdf. 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