Skip to main content



      Home
Home » Archived » BIRT » How to calculate a runningSum?
How to calculate a runningSum? [message #84734] Thu, 27 October 2005 08:23 Go to next message
Eclipse UserFriend
Hello,

I tried to get a runningSum by a group MyGroup.

The syntax, out of the documentations, is:

Syntax: runningSum( expr [, filter [, group ]] )

Here the not helpfull example, also out of the documentation:

Total.runningSum( row.OrderAmt )

But how do I enter the filter? What is the filter? Within '' or "" or what?
How do I enter the group? Within '' or "" or what?

In my current case I need just a total by MyGroup, but what I have to enter
if I need a runningSum by group but without a filter?

Total.runningSum(row["Amount"],,MyGroup) does not work. :-(

How to keep filter empty, but specify the group?

So if one is a newbee it is really hard to use predefined functions if the
documentation is that poor!
(look at the example, the function consists of 1, 2 or three params, the
example just show the obvious case with one param, not really helpful)

Thanks for any help!
Re: How to calculate a runningSum? [message #85475 is a reply to message #84734] Fri, 28 October 2005 15:35 Go to previous message
Eclipse UserFriend
Hi,

- I think runningSum has a bug, its not working as documented. Please log a
bug.
Note: The expression builder does show the function parameters and some
description for the birt java script objects.
- You could use null value, for skipping a parameter.
Total.runningSum( row.OrderAmt, null, 'grpNameCity' );
Note: If you placed the above expression in a groups footer, it will
evaluate for that group. You specify the group name if you want to use a group
other than the current group.
- Filter expression allows user to sum the rows that evaluate to true for the
given filter criteria.
- Check out the section of BIRT Java script object Total in the scripting spec.
on the BIRT website http://www.eclipse.org/birt/ref/ROM_Scripting_SPEC.pdf

--Rima Kanguri

"Mr. Burns" wrote:

> Hello,
>
> I tried to get a runningSum by a group MyGroup.
>
> The syntax, out of the documentations, is:
>
> Syntax: runningSum( expr [, filter [, group ]] )
>
> Here the not helpfull example, also out of the documentation:
>
> Total.runningSum( row.OrderAmt )
>
> But how do I enter the filter? What is the filter? Within '' or "" or what?
> How do I enter the group? Within '' or "" or what?
>
> In my current case I need just a total by MyGroup, but what I have to enter
> if I need a runningSum by group but without a filter?
>
> Total.runningSum(row["Amount"],,MyGroup) does not work. :-(
>
> How to keep filter empty, but specify the group?
>
> So if one is a newbee it is really hard to use predefined functions if the
> documentation is that poor!
> (look at the example, the function consists of 1, 2 or three params, the
> example just show the obvious case with one param, not really helpful)
>
> Thanks for any help!
Previous Topic:Pojo's and a scripted subreport
Next Topic:Drill-down functionality
Goto Forum:
  


Current Time: Fri Apr 25 20:22:35 EDT 2025

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

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

Back to the top