Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Master Detail report
pdube1
Hi,
I want to create a master detail report, where the master section has more than one detail sections.
For example, I have 3 datasets:
1) (Master) Fetches the employees (userId, firtname, lastname);
2) (detail 1) Fetches the list of all goals of the employees (userId, goalName)
3) (detail 2) Fetch all working experience of the employees (userId, companyName)
The result I want would look like this:
User Id: First Name: Last Name:
01 John Smith
Goals Name:
-Get better result
-Be more efficient
-Get better scores
...
Working Experience:
-cie ABC
-cie xyz
...
User Id: First Name: Last Name:
02 Katy Sanders
Goals Name:
-Sell more
-Sign more contract
-Get better scores
...
Working Experience:
-cie DEF
-cie GHI
...
...
I've been able to achieve this by adding 2 sub tables in the master table and adding a filter on the subtables based on a variable set on the master table dataset row.
The problem with this is that the query of the sub tables are executed for each row of the parent data set. What I would have expected is that all 3 dataset are executed once and then birt do the filtering in the rendering phase.
I have also tried the grouping option on a table with a joint data set, but I'm not able to display the data like I want.
Is anybody have an idea how I could achieve this? Any help would be appreciated.
Thanks
Find more posts tagged with
Comments
mwilliams
What is your BIRT version?
You could use dataSet parameter bindings rather than filters. The queries would run for each outer table value, but they would only run for the value in the outer table and not for all and then filter them down. This would be the fastest way.
pdube1
Hi,
I use Birt 2.6.
I have experimented the dataSet parameter binding too. But running the query for each outer table value is not an option in my context, the master result set can be too huge. Also, we have created our own ODA driver which uses web service call to our business layer to get the data, so executing the query that many times is not an option.
Thanks
mwilliams
Why does a joint dataSet not work? What layout issue did you have?
pdube1
Hi,
If I create a joint DataSet and group my element in a table, it works only if I have one detail. For example, I can group all Goals on the UserId.
In my case, with two details (Goals and Work experience), it will repeat all work experience rows for each goal.
Like this:
User Id: First Name: Last Name:
01 John Smith
Goals Name:
-Get better result
-cie ABC
-cie xyz
-Be more efficient
-cie ABC
-cie xyz
-Get better scores
-cie ABC
-cie xyz
...
Thanks
mwilliams
Can you provide me a CSV file of what your data looks like when you have it in your joint dataSet? I'll show you how to set it up to display how you're wanting.
pdube1
Hi,
Attached are the csv files and a report containing the required data sets (what I think would be required).
Thanks
mwilliams
Here's one way to do it with just a joint dataSet. I use Concatenate aggregations and then HTML lists to display the results of the concatenate. Hope it helps.
pdube1
Hi,
It actually does what I need. It may complexify the construction of a report when some more details in the layout is required but still, this is a great solution.
Thank you a lot. Your help is really appreciated.
mwilliams
You're very welcome. Let us know whenever you have questions!
AlbertYu
Hi Michael,
I use BIRT Designer version 2.5.0.v20090616...
Could you please convert the example "EmployeeInformation.rptdesign" to my version?
Thank you,
Albert
mwilliams
Here you go, Albert. Just use the same 3 flat files attached above. Be sure to change the location of the flat files in the dataSource to the location that you save them, before you run the report.
AlbertYu
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="107501" data-time="1343153977" data-date="24 July 2012 - 11:19 AM"><p>
Here you go, Albert. Just use the same 3 flat files attached above. Be sure to change the location of the flat files in the dataSource to the location that you save them, before you run the report.<br /></p></blockquote>
<br />
<br />
Thank you Michael. Hm. I tried running the report, but it gave errors.<br />
<br />
Anyhow, I figured how to do my report without needing to run this one.<br />
<br />
I'll let you know if I have any other questions.<br />
<br />
Regards,<br />
Albert