Consolidating table rows on some conditions [message #916545] |
Wed, 19 September 2012 02:30  |
Eclipse User |
|
|
|
Hi,
i'm using BIRT to manage tables with datasets. Now i have following problem: For example my dataset is consisting of four columns name, payment, date and store. In my table it looks like this:
name payment date store
Thorsten 3,9 01.01.2012 ebay
Thorste 2,3 03.04.2012 ebay
Michael 4,7 03.05.2012 ebay
Michael 3,8 06.06.2012 amazon
Now i want to consolidate the columns that way:
if name[i]== name[j] and store[i]==store[j] then
payment[i]= payment[i]+payment[j];
date[i]= max(date[i],date[j]);
delete(row[j]))
If there are three or more columns with same store and name, then there will be three or more columns consolidated in one. My table should look like this:
name payment date store
Thorsten 6,2 03.04.2012 ebay
Michael 4,7 03.05.2012 ebay
Michael 3,8 06.06.2012 amazon
Is there any way for working with filters or aggregations? Or is it better to work with javascript on onCreate? Unfortunally I'm not so good in javascript...
Greetings Marina
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.26602 seconds