Skip to main content



      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 03:52 Go to next message
Eclipse UserFriend
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.

[Updated on: Wed, 17 December 2014 13:37] by Moderator

Re: Highlight cells in crosstab with color values [message #1506932 is a reply to message #1505716] Thu, 11 December 2014 02:10 Go to previous messageGo to next message
Eclipse UserFriend
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 10:53 Go to previous message
Eclipse UserFriend
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.

[Updated on: Wed, 17 December 2014 13:38] by Moderator

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


Current Time: Mon Mar 17 13:42:38 EDT 2025

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

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

Back to the top