File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes work with a lot of reports in a web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "work with a lot of reports in a web application" Watch "work with a lot of reports in a web application" New topic
Author

work with a lot of reports in a web application

angel sar
Greenhorn

Joined: Aug 29, 2009
Posts: 17
Hi friends, i dont know if my question is in the right place of the forum. Since its about a web application , i ve posted it here
The context is this: A form button will start a big process in the server side. Part of this process is to generate many reports (NOT showing reports through http at this time) and save them. Later a user can export any generated report from the web application.

My doubts are:
Since tthe reports wont be shown at request time, i have to decide when to save them. I have 2 choices, in a folder of the server or in a table of my data base. If i save them in a folder, how can i publish that folder in order to export the reports later?? so i think the best idea is in a data base so i can list the reports titles and link any of them to see the report through the web. But since the process generate like 50 reports daily, maybe it s no t a good idea to use a table.

This is the first time i get this, so i need your opinions and recommendations.

I hope i m clear.

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

I did exactly this in my previous job, and the answer is: a little of both!

I stored the information about what reports were available, along with any metadata about them (status, request time, completion time, who requested it, and so on), along with the location in the folder structure of where the actual report (PDFs in my case) were stored.

That way, the information about the reports is readily available in the database and easily queried, but the reports themselves didn't need to be in the database.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
angel sar
Greenhorn

Joined: Aug 29, 2009
Posts: 17
Thanks for your answer bear. So you mean that I should save the reports in, for example c:/reports, then save some metadata in a table for example the location of the report (c:/reports) and the name of the report (myreport.pdf). Later when a user wants to see the report, the application look for the report and then show the pdf to the user.
Am i wrong or correct?
Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Correct.

That way, you get the best of both worlds!
angel sar
Greenhorn

Joined: Aug 29, 2009
Posts: 17
Thansk again. So I ve decided this: I ll get the report designs from ireport. When the process starts, it ll read the .jaspers , generate the reports in pdf, save them in a folder and then save the metadata for everyone in a table.
Then ill get a jsp that lists all my reports of my table and each link will show a report.
Until here, do you have any code for saving and reading pdf, and then to show the report from the server to the client??

Thanks.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: work with a lot of reports in a web application