Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Highlight cell background
Highlight cell background [message #131156] Thu, 16 February 2006 10:39 Go to next message
Peter Fopma is currently offline Peter FopmaFriend
Messages: 81
Registered: July 2009
Member
I try to highlight a cell in a table according to an expression.
To avoid highlighting only the data I use a global expression
and set the highlight color for the cell background.
But, when running the report only the data is highlighted and the cell
background is not affected at all. Is this correct?
Is there another way to set the background color of a cell according
to the value of an expression?

Thanks
Peter Fopma
Re: Highlight cell background [message #131534 is a reply to message #131156] Thu, 16 February 2006 15:38 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Peter,

Use the outline view and verify that you are not selecting the data element
but the cell element.

Jason




"Peter Fopma" <peter.fopma@ifb-group.com> wrote in message
news:7425ccdae5f4a29249ad3e864a678990$1@www.eclipse.org...
>I try to highlight a cell in a table according to an expression. To avoid
>highlighting only the data I use a global expression
> and set the highlight color for the cell background.
> But, when running the report only the data is highlighted and the cell
> background is not affected at all. Is this correct?
> Is there another way to set the background color of a cell according
> to the value of an expression?
>
> Thanks
> Peter Fopma
>
>
Re: Highlight cell background [message #132093 is a reply to message #131534] Fri, 17 February 2006 10:33 Go to previous messageGo to next message
Peter Fopma is currently offline Peter FopmaFriend
Messages: 81
Registered: July 2009
Member
Jason,

I tried various testcases:

1) An empty column with a defined backgroud color where the highlight is
set for the cell using a global expression.
I assigned diffent styles for the expression evaluation to true or false.
-> The cell does not change, the original backgroud color remains unchanged

2) A column with a data element. Again the highlight is assigned to the
cell.
The cell does not have a backgroud color assigned to it.
-> a) The highlight is 'inherited' by the data element (ie selecting the
highlight of the dataelement shows the highlight of the cell).
b) The background of the cell remains unchanged. The data element shows
the expected highlight.

Deleting the highlight from the data element or changing the original
background color of the cell does not effect the result. Ie. the
background
color does not change.

I tested this for HTML. To see the background of the cell I used a table
where
the first column spreads over multiple lines and the data elements fit in
one line.

Peter Fopma
Re: Highlight cell background [message #1560444 is a reply to message #132093] Mon, 12 January 2015 15:57 Go to previous messageGo to next message
Michelle C. is currently offline Michelle C.Friend
Messages: 8
Registered: June 2014
Location: Switzerland
Junior Member
Hello

Does someone has a solution to that? I have to color the background too. The color values comes from the query in the data set.

Thanks for helping.


Best regards


Open Source BIRT V4.4.0
Elicpse Luna
Oracle
Re: Highlight cell background [message #1561793 is a reply to message #1560444] Tue, 13 January 2015 09:52 Go to previous messageGo to next message
Michelle C. is currently offline Michelle C.Friend
Messages: 8
Registered: June 2014
Location: Switzerland
Junior Member
Got it. I select the cell on outline view. Then I add the follow to onCreate method:
this.getStyle().backgroundColor=row["COLUMNNAME"];


Best regards


Open Source BIRT V4.4.0
Elicpse Luna
Oracle
Re: Highlight cell background [message #1579650 is a reply to message #1561793] Fri, 23 January 2015 03:33 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Glad you found your solution. Let us know whenever you have questions, either here or on the BIRT Developer Center. Smile

Michael

Developer Evangelist, Silanis
Previous Topic:Newspaper Layout with dynamic row height and grouping
Next Topic:Extract data from cross tab in report?
Goto Forum:
  


Current Time: Fri Jul 19 21:45:26 GMT 2024

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

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

Back to the top