Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Group 2 datasets and iterate
shathwar
Hi People,
I have a question on designing a PDF and would appreciate any help with this.
Some facts
My expertise with Birt: 1 month
Our Data source: XML
PDF design tool: Eclipse Birt report designer
2 datasets
Dataset 1 -> N number of <operation1> elements with currency as a child element
Dataset 2 -> N number of <operation2> elements with currency as a child element
Requirement:
Group <operation1> and <operation2> together based on a common currency and iterate for all currencies
example layout that i am after:
Section Header - Operation1 - USD
table with data
Section Header - Operation2 - USD
table with data
Section Header - Operation1 - EUR
table with data
Section Header - Operation2 - EUR
table with data
and so on..
I am struggling to find a way to achieve this. I am not inclined to go API way and would like to achieve this using the birt report designer. Any help to achieve this would be much appreciated.
Cheers.
Find more posts tagged with
Comments
kclark
After you've created the table and added the data you want to group by then select the table and from property editor you can click the grouping tab. From here you can make your group selection. I attached a sample report that groups by job title and office code. If you would like to attach your xml I can create a sample report out of that for you if you'd like.
shathwar
Thanks kclark for your response. I kind of get the idea although still not sure as I am having 2 datasets and hence 2 tables which need to be grouped together and iterated. May be it will work once I give it a try. So, I will get on with that and see how that goes. Meanwhile, I am also attaching my input xml for your reference.
Thanks again for the help. Much appreciated
shathwar
Thanks kclark for your response. I kind of get the idea although still not sure as I am having 2 datasets and hence 2 tables which need to be grouped together and iterated. May be it will work once I give it a try. So, I will get on with that and see how that goes. Meanwhile, I am also attaching my input xml for your reference.
Thanks again for the help. Much appreciated
kclark
You will need to join the two data sets together by right clicking data sets > new join data set. This will allow you to work with both sets of data in the same table. After you've done that you can then group the results by currency then operation.
shathwar
Hey kclark. Your idea works brilliantly. Thanks a lot. Although a new requirement has now crept up and was hoping to get some more direction on it. Requirement is to have a chart based on those groupings in the table
So end result:
Section header - Operation 1 - USD
Chart for op1 in USD
Table for op1 in USD
Section header - Operation 2 - USD
Chart for op2 in USD
Table for op2 in USD
Section header - Operation 1 - EUR
Chart for op1 in EUR
Table for op1 in EUR
Section header - Operation 2 - EUR
Chart for op2 in EUR
Table for op2 in EUR
Can we get charts for groups inside Table?
kclark
No problem! You should be able to chart anything in your joined data set like you normally would with the chart designer. You can also create the charts from script using the grouped data if you'd like. I've attached a rptdesign that shows how to create a pie chart from script.
shathwar
Cool. Will give it a try on Monday, need to head to Pub now. Thanks a lot mate, I owe you a pint.