Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » SOLVED: Highlight cells in crosstab with color values
SOLVED: Highlight cells in crosstab with color values [message #1505716] Wed, 10 December 2014 08:52 Go to next message
Michelle C. is currently offline Michelle C.Friend
Messages: 8
Registered: June 2014
Location: Switzerland
Junior Member
Hello

I searched the forum for my problem and cannot find any answers.

I have a report created with crosstab. In my data I have the color code as a value (#aarrggbb). How can I highlight the background with that value? All I see with a highlight is to set the rgb with numbers or with the color name. I cannot set the color while creating the report, because I don't know how many values I have.

It is for a daily plan with hours scale on top. In the calculation there are appointments that I have to highlight it.

Thanks for your help.


Best regards


Open Source BIRT V4.4.0
Elicpse Luna
Oracle

[Updated on: Wed, 17 December 2014 18:37]

Report message to a moderator

Re: Highlight cells in crosstab with color values [message #1506932 is a reply to message #1505716] Thu, 11 December 2014 07:10 Go to previous messageGo to next message
hao WU is currently offline hao WUFriend
Messages: 1
Registered: December 2014
Junior Member
I think you can get you color value using:
function onCreateCell( cellInst, reportContext )
{
if(cellInst.getCellID()==902){ //the cellid of the color value
cellInst.getDataValue('cellvalue')
}
}
}
and set the color value in the golbal variable
color

then use the global to set the cell color :

function onCreateCell( cellInst, reportContext )
{
if(cellInst.getCellID()==902){ //the cellid of the color value
cellInst.getStyle().setBackgroundColor(color)
}
}
Re: Highlight cells in crosstab with color values [message #1514779 is a reply to message #1506932] Wed, 17 December 2014 15:53 Go to previous message
Michelle C. is currently offline Michelle C.Friend
Messages: 8
Registered: June 2014
Location: Switzerland
Junior Member
Hello hao WU

Thanks for your post. How do I know the cell ID? And where should I call this function?

Update 17.12.2014 19:35:
Found it ("Element ID" in general property). Thanks a lot for the example.


Best regards


Open Source BIRT V4.4.0
Elicpse Luna
Oracle

[Updated on: Wed, 17 December 2014 18:38]

Report message to a moderator

Previous Topic:BIRT Report with group with count exprssion
Next Topic:ColumnHints in ODA driver extenstion
Goto Forum:
  


Current Time: Sat Jul 20 12:40:27 GMT 2024

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

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

Back to the top