It's all about the answers!

Ask a question

"Group By" Equivalent for BIRT


Andrew Trobec (49712144139) | asked Jul 02 '10, 9:02 a.m.
Hello Everyone,

How is it possible to sum a list of values from multiple input lines in a BIRT report into a single line?

For example, I need to aggregate the total number of hours spent working on a task. In the event that a person updates the "Time Spent" field more than once in a day, I need to be able to sum those individual changes into a single line.

So if the input is:

02/07/2010|Task 20|4 hours
02/07/2010|Task 20|8 hours

I need to be able to have a single line:

02/07/2010|Task 20|12 hours

(this example already assumes that I have accessed the history of the record to calculated the difference between TIME_SPENT and PREV_TIME_SPENT)

How is this possible?

Thank you in advance!

Best regards,

Andrew

One answer



permanent link
Milan Krivic (98010172139) | answered Jul 04 '10, 8:01 p.m.
Hello Everyone,

How is it possible to sum a list of values from multiple input lines in a BIRT report into a single line?

For example, I need to aggregate the total number of hours spent working on a task. In the event that a person updates the "Time Spent" field more than once in a day, I need to be able to sum those individual changes into a single line.

So if the input is:

02/07/2010|Task 20|4 hours
02/07/2010|Task 20|8 hours

I need to be able to have a single line:

02/07/2010|Task 20|12 hours

(this example already assumes that I have accessed the history of the record to calculated the difference between TIME_SPENT and PREV_TIME_SPENT)

How is this possible?

Thank you in advance!

Best regards,

Andrew


Hi Andrew,

You should group your data by work item id, by inserting group on table level above.
Then, you can create a new column in your table, and add new aggregation in it.

enter column binding name and display name, and under data type choose integer, and under function choose SUM.
Then, in expression field, choose row TIME_SPENT. If you 've grouped your data by work item id as mentioned before, you must choose Aggregate on: your_group.

Hope this helps,

Regards,

Your answer


Register or to post your answer.