Home
Analytics
Report within a Report
ATirumalas
Hi,
Is it possible to incorporate a Child-Report within a Parent-Report (without any user-interaction like hyperlinks)?
This Child report is being used in Multiple Parent reports and I want to reuse this instead of having this incorporated in every Parent report. Hence if any modifications are made in the Child report, I need not update every Parent report.
Please note, when the Parent Report is run it automatically includes the output of the child report.
I read somewhere that there was a problem with PageNumbers when such sub-reporting is done. Does this problem still exisits in version Helios?
Thanks for your reply.
-Aj
Find more posts tagged with
Comments
CBR
Hi,
unfortunately this is currently not possible. A subreport in BIRT is slightly different from subreports in other reporting tools (like Crystal). A subreport in BIRT is just a table within a detail row of a parent table. The content of the inner table can depend on the data of the detail row of the outer table.
In your case i would suggest that you add all elements of your child report to a library. You can then use the library in each parent report and just drag&drop the child element into the parent. It will look like you created the child in the parent report (the child will be a element of the parent report).
The big advantage is that each parent has a reference to the child in the library. If you decide to modify the child just open the library and change it there.
ATirumalas
Hi,
Thanks for the reply. I made some tests on using of Library and unable to get conclusions due to resource unavailablitiy. I will try to expain the best I could, please help.
Earlier
1. I am developing reports using BIRT Eclipse and check there reports in SVN.
2. I upload these reports to Actuate BIRT, which can be run using the Actuate dashboard.
Proposed Changes
1. I am now implementing a Report Library, and Report Design Files.
2. I will check the Report Libraries files in the SVN (Is there any specific location I need to check them in or can I mix them with rprDesign files) & Report Design files in SVN.
3. Should I upload the library file onto the Actuate BIRT tool as well? If yes is there any specific location they have to be uploaded to?
3. Say, the library file needs some update, I make the required changes and check the library file into the SVN. How are these changes propagated to the Report Files? Should all the reports still need to be revisited to get the updates from the library? Or just replacing the library file in the Actuate BIRT tool would be able to handle the change propagation?
I do not have access to the Actuate BIRT tool to test the behaviour. Please help.
Thanks!!
CBR
Hi,
i ll adress your questions using the numbers you provided in your post
1) Yes that's the idea. You will create one or multiple report libraries that are beeing used in your reports.
2) You can mix them up with your reports or you can upload them to some other folder in your svn repository. The only thing you have to keep in mind is that you have to tell BIRT the location of the libraries before you are able to run a report that uses a library. The main idea behind the library concept is that each element in the library is to be kept in the library. If you are using a element of a library in one of your reports it looks like this element is beeing copied out of your library into your report. But that's not true at all. The only thing that is copied into your report is a notice that the report uses library x and that at some point in the report element y of library x is to be displayed. The folder where BIRT looks for library is called the resource folder. You can set the resource folder to any folder of your file system, or when working with eclipse you can even set the resource folder to another eclipse project. This is useful if you want to have a seperate project where you store all external files like libraries, images, i18n property files.
3) Yes. You have to upload the libraries to your server as well! Otherwise your report throws a error each time a users wants to see it. I only know about the OpenSource BIRT, so i m not sure where you have to upload it. Just have a look for some folder or option called resources.
4) See my answer above. If you do changes to a element in a library it's not even required to open the parent reports. The element of a library is copied from the library every time you want to display the parent report (so there is no propagation needed because all the magic is done when a user wants to generate the parent report)
johnw
Yes, you can run a report within another report using the Report Engine API in an event handler. Scott Rosenbaum from the Eclipse BIRT committee had written something up to do this, and I thought he had posted it on the BIRTWorld blog, however I cannot seem to find it at the moment, so I can't provide an example off hand.
The basic idea being in the beforeFactory or initialize event, you are creating a new Run/Render task, and saving the output into a string (for an embedded report like this, you would set the output to render as a reportlet, or with the setEmbedded option to true in the RenderTask). With that string, you then display it with a Text data element. You could also do something along the lines of a scripted data set doing this, and each row in the scripted data set would be a different report. It is a much simplified process since you do not need to initialize a platform, you just create the tasks and execute.
Page numbering wouldn't be a problem since this would be handled by the parent report during the render phase.
If you're using iServer, it should be even easier, you can use Text elements set to HTML, and include the applet URL's (I believe you are looking for executeReport.do), which are all described in detail in the iServer documentation. You could even just make the calls using JSAPI, which would be available from the Interactive Viewer environment.
ATirumalas
@ cbrell: Thanks for the details provided regarding the Library implementation. I was able to implement and work with it yesterday. I will try this on Actuate iServer when I have access to it, I just need to figure out where in iServer should I upload the Lib files. Will try this!
@ johnw: Many Thanks for the information provided. This will be really helpful that such a requirement can be implemented. I will try to google it and upload it if I find any. Incase you find it, please upload the same. I will try to implement based on the logic provided. Thanks once again.