This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
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 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.
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?
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??