Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Problems with column aggregation(Unable to format aggregation)
icon5.gif  Problems with column aggregation [message #642361] Tue, 30 November 2010 19:51 Go to next message
Shine is currently offline Shine
Messages: 4
Registered: November 2010
Junior Member
Hello,
I am trying to design a BIRT report using BIRT version 2.6.1. I have to find the total sum of a particular column.
Following are the steps I follow:
1. Drag & drop 'Aggregation' from 'Quick Tools' in Palette to my table footer.
2. 'Expression' for aggregation is row["my_column_name"].
3. I also have a filter which filters out data if value of column is, for eg, equal to 0.

My problem is that, there could be a possibility that all the rows in my column have a value of 0. If this is the case, my filter will always return 'false'. Thus my aggregation will return nothing. I want to display '0' instead of nothing under the aggregation column.

Is there any way of achieving this? Any help would be appreciated. Thanks.
Re: Problems with column aggregation [message #642572 is a reply to message #642361] Wed, 01 December 2010 14:30 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Is this a sum?
One way to do this is to use the following oncreate script for the
aggregation element:

if( this.getValue() == null ){
this.setDisplayValue(0);
}

Jason

On 11/30/2010 7:51 PM, shinejose22@gmail.com wrote:
> Hello,
> I am trying to design a BIRT report using BIRT version 2.6.1. I have to
> find the total sum of a particular column. Following are the steps I
> follow:
> 1. Drag & drop 'Aggregation' from 'Quick Tools' in Palette to my table
> footer.
> 2. 'Expression' for aggregation is row["my_column_name"].
> 3. I also have a filter which filters out data if value of column is,
> for eg, equal to 0.
>
> My problem is that, there could be a possibility that all the rows in my
> column have a value of 0. If this is the case, my filter will always
> return 'false'. Thus my aggregation will return nothing. I want to
> display '0' instead of nothing under the aggregation column.
> Is there any way of achieving this? Any help would be appreciated. Thanks.


Jason Weathersby

BIRT Exchange
Re: Problems with column aggregation [message #642579 is a reply to message #642572] Wed, 01 December 2010 15:10 Go to previous message
Shine is currently offline Shine
Messages: 4
Registered: November 2010
Junior Member
Thanks a lot ... That worked perfectly for me Smile
Previous Topic:Spacing in multi series pie chart
Next Topic:Chart Error
Goto Forum:
  


Current Time: Sun Apr 20 18:14:52 EDT 2014

Powered by FUDForum. Page generated in 0.03982 seconds