问题
We currently have a whole suite of report designs that cover various parts of our app, and these reports are generated on demand by our users.
I want to be able to bundle up several of these reports into a single report to return to the user.
I initially hacked up a custom report builder that generated report design files using segments inside a report library file, and then ran that generated design, but this was unwieldy and a pain to manage as I had to duplicate the individual reports (still required) inside the report library file. Any changes to the stand-alone reports had to be duplicated in the library for the combined reports.
What I am really looking for is a way to specify several design files, have them all run, and then return a single file to the user, containing all the reports they selected.
回答1:
This is a fairly common request, that we are working on but have not solved yet.
One approach that is not ideal that you can use today is to run each report and then combine the output from each rptdocument. BIRT-exchange has an example of this here for PDF and HTML. The problem is that the page numbering will not be correct and the TOC will not be right either.
The better approach is if there was a merge report engine task that would allow you to combine multiple rptdocuments into a single rptdocument with appropriate pagination and TOC. There is a bugzilla entry here that I hope to see in the 2.5 (June 2009) version of the product. If you are interested please have a look in and give your feedback.
Finally, one of the features that I would like to see in the product for 2009 is some refinement to the DesignEngine API that allows a developer to easily compose a single report design at runtime, using components from other report designs. I have created a bugzilla to track this too.
If none of these seem appropriate let me know and I will see if I can help you find a different solution.
来源:https://stackoverflow.com/questions/228458/how-do-i-combine-multiple-birt-reports