Advice on Using JasperReport in Production

By: Outey Ky - chhunak
Advice on Using JasperReport in Production
2002-10-30 13:34
My 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:54
I 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:22
I 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:21
I 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.
2001 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:26am
Last seen: 17 years 1 month ago

0 Answers:

No answers yet
Feedback
randomness