Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » hiding column after rendering
hiding column after rendering [message #733849] Wed, 05 October 2011 19:22 Go to next message
Tobbi Filteau is currently offline Tobbi Filteau
Messages: 10
Registered: September 2011
Junior Member
Hi there,

I'm creating a BIRT report that's supposed to display my company's clients expenses. I'm using a table and the lines are used to give the different divisions of a client while the columns are used to display the different categories of expenses.

The problem I have is that not all clients have every expense categories, so a lot of the columns end up being filled with zeroes. I essentially want to hide those said columns... but I can only tell if a column is filled with 0 AFTER it's actually rendered at which point it's too late for the visibility property to kick in.

Is there another way of proceeding with this?

Thanks in advance

Osu
Re: hiding column after rendering [message #733860 is a reply to message #733849] Wed, 05 October 2011 19:46 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Why not add an aggregate computed column to the dataset that sums the
column for all rows. Use the computed column in the column visibility
expression.

Jason

On 10/5/2011 3:22 PM, tob_filt wrote:
> Hi there,
>
> I'm creating a BIRT report that's supposed to display my company's
> clients expenses. I'm using a table and the lines are used to give the
> different divisions of a client while the columns are used to display
> the different categories of expenses.
> The problem I have is that not all clients have every expense
> categories, so a lot of the columns end up being filled with zeroes. I
> essentially want to hide those said columns... but I can only tell if a
> column is filled with 0 AFTER it's actually rendered at which point it's
> too late for the visibility property to kick in.
>
> Is there another way of proceeding with this?
>
> Thanks in advance
>
> Osu
Re: hiding column after rendering [message #733884 is a reply to message #733860] Wed, 05 October 2011 21:05 Go to previous messageGo to next message
Tobbi Filteau is currently offline Tobbi Filteau
Messages: 10
Registered: September 2011
Junior Member
Yeah, I tried that initially and it works... except at one point, a division has an expense of 154$ and another division, for the same expense, actually has a credit of the exact same amount. If I sum the whole thing, the overall total ends up as 0... but I don't want this column hidden in this case because something actually happened. It's just coincidence that I have two transactions that cancel each other out.
Re: hiding column after rendering [message #733899 is a reply to message #733884] Wed, 05 October 2011 21:46 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Use a Max and a Min function instead of sum. This will require two
computed columns though.

Jason

On 10/5/2011 5:05 PM, tob_filt wrote:
> Yeah, I tried that initially and it works... except at one point, a
> division has an expense of 154$ and another division, for the same
> expense, actually has a credit of the exact same amount. If I sum the
> whole thing, the overall total ends up as 0... but I don't want this
> column hidden in this case because something actually happened. It's
> just coincidence that I have two transactions that cancel each other out.
Re: hiding column after rendering [message #734035 is a reply to message #733899] Thu, 06 October 2011 12:52 Go to previous messageGo to next message
Tobbi Filteau is currently offline Tobbi Filteau
Messages: 10
Registered: September 2011
Junior Member
Goodness, I was so fixated on the sum I forgot there were actually other aggregation functions available! All I have to do is use a count with a filter on non-zero values!!! That should work pretty nicely.

Also, if I hide this aggregation for all outputs, can I still use it to set the visibility of the column? I suppose so, since the control still exists even if it's hidden.

Thanks a lot for giving me this idea with your suggestion Very Happy.

Osu
Re: hiding column after rendering [message #734094 is a reply to message #734035] Thu, 06 October 2011 16:12 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Absolutely as long as the aggregation appears in the table bindings it
will be evaluated.

Jason

On 10/6/2011 8:52 AM, tob_filt wrote:
> Goodness, I was so fixated on the sum I forgot there were actually other
> aggregation functions available! All I have to do is use a count with a
> filter on non-zero values!!! That should work pretty nicely.
>
> Also, if I hide this aggregation for all outputs, can I still use it to
> set the visibility of the column? I suppose so, since the control still
> exists even if it's hidden.
>
> Thanks a lot for giving me this idea with your suggestion :d.
>
> Osu
Re: hiding column after rendering [message #739409 is a reply to message #734094] Mon, 17 October 2011 12:52 Go to previous message
Tobbi Filteau is currently offline Tobbi Filteau
Messages: 10
Registered: September 2011
Junior Member
Hey there, just to say I got along to try it and it indeed works like a charm (I know it's been a while, but work's insanely crazy lately) Smile. Thanks a lot again
Previous Topic:Line Chart- how to cut Time Value from Date for Series Labeles
Next Topic:BIRT 3.7 emitter dependencies
Goto Forum:
  


Current Time: Tue Sep 23 00:24:34 GMT 2014

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

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