Skip to main content



      Home
Home » Archived » BIRT » Highlight cell background
Highlight cell background [message #131156] Thu, 16 February 2006 05:39 Go to next message
Eclipse UserFriend
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 10:38 Go to previous messageGo to next message
Eclipse UserFriend
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 05:33 Go to previous messageGo to next message
Eclipse UserFriend
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 10:57 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Highlight cell background [message #1561793 is a reply to message #1560444] Tue, 13 January 2015 04:52 Go to previous messageGo to next message
Eclipse UserFriend
Got it. I select the cell on outline view. Then I add the follow to onCreate method:
this.getStyle().backgroundColor=row["COLUMNNAME"];
Re: Highlight cell background [message #1579650 is a reply to message #1561793] Thu, 22 January 2015 22:33 Go to previous message
Eclipse UserFriend
Glad you found your solution. Let us know whenever you have questions, either here or on the BIRT Developer Center. Smile
Previous Topic:Newspaper Layout with dynamic row height and grouping
Next Topic:Extract data from cross tab in report?
Goto Forum:
  


Current Time: Sat Mar 15 04:40:44 EDT 2025

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

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

Back to the top