Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Computed column: String display(colors on display String computed column)
Computed column: String display [message #663172] Mon, 04 April 2011 08:26 Go to next message
gin1975  is currently offline gin1975 Friend
Messages: 30
Registered: April 2011
Member
I have a "computed column" that shows the result (string) through the use of display String = "<result>. " Is there any way to show that result in the report, based on a certain condition, in a specific color (eg red if the result is "NOK")?

Thanks.
Re: Computed column: String display [message #663277 is a reply to message #663172] Mon, 04 April 2011 14:03 Go to previous messageGo to next message
JulioC Missing name is currently offline JulioC Missing nameFriend
Messages: 33
Registered: March 2011
Location: Ottawa, Canada
Member
I think you can drop the variable into your report layout.
Once is in there just click on that field, then go to the script tab.
In there pickup 'OnCreate' and put something like this.

if( this.getValue() > 30 ){
this.getStyle().fontFamily = "Arial"
this.getStyle().backgroundColor = "Red"
}

Re: Computed column: String display [message #663482 is a reply to message #663172] Tue, 05 April 2011 10:02 Go to previous message
Jani  is currently offline Jani Friend
Messages: 14
Registered: April 2011
Junior Member
Can't you just use highlights of data element and add there a rule like:

row["Contact Full Name (FirstName LastName)"] Match "Annette  Roulet"

Above Contact Full Name (FirstName LastName) is a data binding. (I'm just walking thour the tutorial.)

Or is your computed column somehow more special ?
Previous Topic:Styles not available on Report Designer's Element > Style menu
Next Topic:Master-Detail with different levels
Goto Forum:
  


Current Time: Sat Apr 27 00:38:57 GMT 2024

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

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

Back to the top