Forum Discussion

OSAdmin's avatar
OSAdmin
Valued Contributor
4 years ago

Change the color of the Header bar in a report

Originally posted by Bart DeHaas

I have a cubeview that is run in a reporting book. I have created a Cubeviewer extender rule to change some formatting. For example, to put a different logo on the report based on the entity. It works fine. On the report there is also a header line and I can adjust the header line height by the following code 

ElseIf uiItem.UIItemType = XFReportUIItemType.PageHeaderLabelBar Then
uiItem.Height = 1

I also wanted to change the color to the company color. But it does not do it, I used uiItem.Bordercolor. But it keeps it black (See below picture, what I am looking for). Does somebody know how to do this?

  • OSAdmin's avatar
    OSAdmin
    Valued Contributor
    Originally posted by Lee Bown

    Hi Bart,


    Try uiItem.BackgroundColor

    If uiItem.UIItemType = XFReportUIItemType.PageHeaderLabelBar Then
    				uiItem.Height = 50
    				uiItem.BackgroundColor = XFColors.Yellow
    			End If

    Regards,
    Lee

  • OSAdmin's avatar
    OSAdmin
    Valued Contributor
    Originally posted by Bart DeHaas

    Thanks Lee! Works. I even got it to use own colors 

    uiItem.BackgroundColor = XFColors.GetOrCreateColor("#FF3a5fcd")