Kategorien
Allgemeines

ColorTable QlikView HTML4 Color Loader

ColorManagement in QlikView is sometimes a bit of a pain. To get a subset of standard colors you can use this script and the appended csv-File to get the html4 standard colors (by name).

This script enables you to import all standard html4 colors:

// ************************************************** //
// AUTHOR Philipp Frenzel <philipp@frenzel.net        //
// ************************************************** //

SET varStringDocumentName = "=DocumentName()";

ColorTable:
LOAD ColorName, 
     Red, 
     Green, 
     Blue
FROM
[Beeye QlikView Colortable.csv]
(txt, codepage is 1252, embedded labels, delimiter is ';', msq);

// ************************************************************** //
// Dynamic Variables by Frenzel GmbH - COPY 2013 www.frenzel.net  //
// AUTHOR Philipp Frenzel <philipp@frenzel.net                    //
// ************************************************************** //

//Get the number of available rows in the rights table
LET varIntegerNoVariables = NoOfRows('ColorTable');

TRACE Number of Dynamic Color Vars: $(varIntegerNoVariables);

//Lets build the dynamic variables
FOR DatenbankIter = 0 TO $(varIntegerNoVariables) - 1

     //here we build the logic for the color coding
    LET curVariableName = peek('ColorName',DatenbankIter,'ColorTable');
    LET col$(curVariableName)= 'rgb(' & peek('Red',DatenbankIter,'ColorTable') &',' & peek('Green',DatenbankIter,'ColorTable') &','& peek('Blue',DatenbankIter,'ColorTable') &')';

NEXT

And you can download a zip example from here:

Download

And looks like:
beeye_colors

Schreibe einen Kommentar