COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognosun on 29 May 2013 07:21:55 AM

Title: Value prompt - values in colours
Post by: cognosun on 29 May 2013 07:21:55 AM
Hi,

I've got 4 values in my value prompt drop down...in which 2 are of default selection ( check box/right mark symbol).

Is there any way to give background color to those "specific 2" values, using conditional variables.

Thanks,
Joys
Title: Re: Value prompt - values in colours
Post by: Satheesh on 07 Jun 2013 05:00:29 AM
Hi,
By Using Java Script you can apply the colors....




Regards
Sateesh
Title: Re: Value prompt - values in colours
Post by: blom0344 on 07 Jun 2013 06:40:15 AM
Well, let's give us some JS to get an idea..
Title: Re: Value prompt - values in colours
Post by: Satheesh on 10 Jun 2013 12:50:39 AM

<script type="text/javascript">


var fw=getFormWarpRequest();
var dl = fw._oLstChoicesmyDropDownPrompt;
var color = ["CEECFF","#7EECE5","#C8ECA5","#4EEC95","#CEEC15","AB9832","#ACEB95","#BCBB99","#ACCA99"];
for( var i=0; i<dl.length;i++)
dl.options.style.backgroundColor = color;
</script>