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)
Detailed (aggregated) group info in group footer
sadko
Hi,<br />
<br />
I'm looking for a way to display aggregated details of the group in group footer.<br />
For that i tried to use an inner table in the group footer. While I can list there details, I found no way to aggregate on them.<br />
It looks like the following:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<table>
<group 1 (customer)>
<group2 (charge)>
<group2 details>
Charge1 Amount
LinkedTax1 Amount
LinkedTax2 Amount
Charge2
LinkedTax2 Amount
LinkedTax3 Amount
</group2 details>
<group2 footer>
..... totals....
<inner table>
<group3 LinkedTax>
<group3 details (hidden)>
LinkedTax1 Amount
LinkedTax2 Amount
LinkedTax2 Amount
LinkedTax3 Amount
<group3 details>
<group3 LinkedTax footer>
LinkedTax1 SUMAMOUNT
LinkedTax2 SUMAMOUNT
LinkedTax3 SUMAMOUNT
</group3 LinkedTax footer>
</inner table>
</group2 footer>
</table>
</pre>
When I try to aggregate to get the Sum Amount per linked tax type, there is no way to aggregate over the internal table's group (group3), the only groups available for aggregation are outer groups (group1 and 2). Also if trying to aggregate over inner table instead of a group I'm getting exceptions of "invalid bound column name".<br />
Sorry if I'm not explaining clear enough, I'm a newbie in BIRT. :huh: <br />
Any help will be much appreciated.
Find more posts tagged with
Comments
mwilliams
Hi sadko,
So, you're wanting to know how to put totals where you have "totals" listed in your diagram above? Is this correct? If so, what are you wanting to total?
sadko
What I can't get is SUMAMOUNT values in the diagram.
They should aggregate amounts per each LinkedTax% in the inner table.
Say I had something like:
<group3 details (hidden)>
LinkedTax1 $0.3
LinkedTax2 $0.2
LinkedTax2 $0.4
LinkedTax3 $0.5
<group3 details>
What I need to get in the footer is
<group3 LinkedTax footer>
LinkedTax1 $0.3
LinkedTax2 $0.6
LinkedTax3 $0.5
</group3 LinkedTax footer>
But (probably) since it is an aggregation in the inner table, it does not let me to aggregate on the inner group or on the table itself.
mwilliams
sadko,
If you have:
LinkedTax1 $0.3
LinkedTax2 $0.2
LinkedTax2 $0.4
LinkedTax3 $0.5
which you're hiding and want to get:
LinkedTax1 $0.3
LinkedTax2 $0.6
LinkedTax3 $0.5
You'd just add another group to your table on the "LinkedTax" and replace the "value" field with a SUM aggregation in the group header or footer and delete the detail row if you don't want to see the details. Let me know if I'm still not understanding correctly.
If I'm not understanding, if you could supply a small csv file of data and tell me what you want it to look like in your final report, I'll make up a quick example. I'll also need your BIRT version if you'd like me to do this. Let me know!
sadko
Michael,
I'm attaching both input csv data file (db.txt) and a test report.
Please take a look at the aggregation in the footer of the inner table.
It is supposed to sum up tax amounts per tax type.
Either way I try to define it, it does not work.
May be I just don't know how to create a correct binding.
Let me know if you have any ideas please.
Thanks!
mwilliams
Is this what you're wanting? Check out the attached report.
sadko
Unfortunately it only works when there is one customer in the DB.
With more than one it sums up incorrectly (it aggregates for all customers each time).
Please check with the attached DB.
mwilliams
Here you go. You just needed to add a filter to the inner table to only show the tax for the current customer. I didn't do that because you only had one customer in the first data. Take a look. Let me know if you have questions.
sadko
Just what I needed! Thanks a lot!
One more related question: is it documented somewhere in what cases elements like the inner table (or data elements in it) must be based on a data set explicitly? It's not clear to me in what cases it can be left as "None" there.
mwilliams
I don't know that there's any good documentation. When I went to try it, the aggregation in the table not hooked to the dataSet didn't work, so I just attached it to the dataSet. The table worked, but for some reason the aggregation did not. That may be a bug. I'll do a little more testing. Whenever you have questions on the best way to do things, feel free to ask in here! The available documentation for BIRT can be found here:
http://www.birt-exchange.com/be/downloads/documentation/#currentdocs