Skip to main content



      Home
Home » Archived » BIRT » Total.sum in group footer
Total.sum in group footer [message #147383] Thu, 23 March 2006 07:05 Go to next message
Eclipse UserFriend
Originally posted by: r.budner.abg.com.pl

Hi,

Did you know that expression Total.sum(row.YourColumn) returns different
values depending on where it is used?
When used in table footer it returns total sum for all rows in the table.
When used in group footer it returns total sum for that group.

I'm supprised at such behaviour. I thought that
Total.sum(row.YourColumn, null, "group_name") is for calculating sums
over the groups.

How can I calculate percent of the group when I can't use total sum?
Re: Total.sum in group footer [message #147605 is a reply to message #147383] Thu, 23 March 2006 16:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vladperl.semanticprogrammer.org

> Did you know that expression Total.sum(row.YourColumn) returns different
> values depending on where it is used?
> When used in table footer it returns total sum for all rows in the table.
> When used in group footer it returns total sum for that group.

That is correct behaviour.

>
> I'm supprised at such behaviour. I thought that Total.sum(row.YourColumn,
> null, "group_name") is for calculating sums over the groups.
>
> How can I calculate percent of the group when I can't use total sum?

You can use total sum, for this just use constant "Total.OVERALL"

At least this worked for me:
Finance.percent(Total.sum(row["VisitCount"],null,Total.OVERALL,
Total.sum(row["VisitCount"]),100)

For some information you could take a look inside "Birt Developer Guide"
under section "Scripting Reference".
Re: Total.sum in group footer [message #147655 is a reply to message #147383] Thu, 23 March 2006 17:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vladperl.semanticprogrammer.org

one more example:
Finance.percent(Total.sum(row["VisitCount"], null,
1),Total.sum(row["VisitCount"]),100)

1 is index of group
Re: Total.sum in group footer [message #147811 is a reply to message #147605] Fri, 24 March 2006 06:40 Go to previous message
Eclipse UserFriend
Originally posted by: r.budner.abg.com.pl

Thanks for Your help.

You're absolutely right. I've missed this important constant reading
"Birt Developer Guide"

Thanks again.

Robert
Previous Topic:Birt Styles
Next Topic:BIRT on a standalone application
Goto Forum:
  


Current Time: Wed May 28 23:22:13 EDT 2025

Powered by FUDForum. Page generated in 0.04186 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top