Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Wanted to use single color format for all dashboards, Please help

Hello Everyone,

We as a team developing couple of reports with multiple tabs, we wanted to use single color format for all dashboards, We have many components in the dashboards, like headers, footers, list boxes and different charts.

We wanted to use VB script to make it possible, we can create variables for each color and use, but that includes too much efforts,

Can any one help me to write vb script, Please share with me if anybody has samples

Thank you so much guys, it will be very much useful to me

5 Replies
stigchel
Partner
Partner

Are you aware of the create and apply style/theme possibilities? See the help:

Layout Themes

About QlikView Layout Themes

Theme Basics

A QlikView layout theme is a set of formatting properties that can be applied to a whole QlikView layout or to parts thereof. Theme files are coded in xml and normally kept in a special QlikView theme folder under Windows' Application Data folder for the active user.

Themes can significantly reduce time and effort needed to make a QlikView layout good-looking and consistent. They can also be used to enforce a certain graphical style within a company etc.

Not applicable

Hello Piet,

Thanks for the response, Yes i am aware of the themes, but i wanted to apply a custom colors(what i want), for each and every components, included bar in charts. i think in theme maker we do not get these options if i am not wrong.

If we can create custom theme to specific for the components, please share some example with me,

Thanks again

martynlloyd
Partner
Partner

If you want headers to be consistent across tabs, then use the same object name in all tabs, instead of making a copy.

Across documents, I think the best way is to have a Template application. (And some developer rules).

By using consistent variables and the Include statement, it is possible to allow users to customize their preferences.

Not sure were you are going with the idea of a script?

regards,

M.

Not applicable

Please look the sample script to change the default selected colors

Dim UserPrefs
set UserPrefs = _
ActiveDocument.GetApplication.GetUserPreferences
' Set the "Selected" Color
UserPrefs.CustomSelBgColor(1).PrimaryCol.Col = _
RGB (0,0,255) ' Blue
UserPrefs.CustomSelFgColor(1).PrimaryCol.Col = _
RGB (255,255,0) ' Yellow
' Set the "Possible" Color
UserPrefs.CustomSelBgColor(2).PrimaryCol.Col = _
RGB (255,255,0) ' Yellow
UserPrefs.CustomSelFgColor(2).PrimaryCol.Col = _
RGB (0,0,0) ' Black
' Set the Excluded Color
UserPrefs.CustomSelBgColor(5).PrimaryCol.Col = _
RGB (200,200,200) ' Light gray
UserPrefs.CustomSelFgColor(5).PrimaryCol.Col = _
RGB (0,0,0) ' Black
' Set the Locked Color
UserPrefs.CustomSelBgColor(0).PrimaryCol.Col = _
RGB (255,0,0) ' Red
UserPrefs.CustomSelFgColor(0).PrimaryCol.Col = _
RGB (0,0,0) ' Black
ActiveDocument.GetApplication.SetUserPreferences _
UserPrefs
end sub

flipside
Specialist II
Specialist II

I've recently added branding to my suite of documents and started including a colours table in the script ...

Load ColID, ARGB(A,R,G,B) as ARGB inline [
ColID,   A,   R,   G,   B, Note
TabRelNotes,  255,   0, 128,   0, BG colour for Release Notes Tab
TabDev,       255, 255,   0,   0,
TabHelp,   255, 255,   0, 255,
IceBlue,   255, 231, 233, 235,
SheetDefault, 255, 248, 248, 248,
LightGrey,   255, 206, 206, 206,
MidGrey,      255, 130, 130, 130,
DarkGrey,     255,  54,  54,  54,
CurrSelInd,   255, 202, 255, 202,
SelBoxInd,   255, 234, 236, 239,

];

Then call the colour using Set Analysis in the colour expression ...

only({<ColID={'TabRelNotes'}>} ARGB)

I've got these set up in nearly all my colour expressions - I'm surprised that performance seems unaffected but it's good fun!

flipside