cancel
Showing results for 
Search instead for 
Did you mean: 

Pass accent color as variable

Former Member
0 Kudos

Our reports are mostly gray and black affairs, but certain items are 'accented' in blue: Title and Group Headings, for example.

Our product manager would like to implement this user story:

"As a user running a report on our application, I want to be able to choose the accent color and see it applied to the generated report, thus allowing our many varied users to apply their main corporate color to their report."


How do I make color a variable for the Title text box and the Group Heading fields?


Thank you kindly.




Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi,

You'd need to write something like this:

If {?Color} = 'Blue' then

     Color(0,0,255)

else if {?Color} = 'Red' then

     Color(255,0,0)

-Abhilash

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you both, this is useful.  Both would work but I think the second may be more useful, as we only have about six accent colors should could take the time to make a case declaration for each of those six. 

Thank you.

former_member205840
Active Contributor
0 Kudos

Hi Vancouver,

There is a way to implement this :

Create an optional parameter 'color', while running report the use can select the color which he would like to apply as back ground for a specific section.

Now go in section expert, select the section and click on Color tab from right hand side pane and select formula editor and give below formula :

If Hasvalue({?color}) then {?color} else true

I checked up this, the back ground color is accepting only number type parameter value, so you need to find the suitable number for your color coding.

Thanks,

Sastry