QR Codes drawn by QlikView Barchart, no extension, no webservice

    You may have seen my Barcode 39 example [Barcode 39 with QlikView Standard Barchart (no font) ], which uses a QlikView Barchart to draw scannable bar codes. This is the next version of QV App which is drawing the QR code with a stacked barchart. Drawing the QR code is NOT depending on a webservice to generate the canvas, nor on an extension.


    However, the logic to encode a text or number combination into a QR chart requires a logic, which seems to be difficult to translate into the QlikView script. I found a simple PHP code, which can be contacted during QV script reload for each new text.


    Put those 3 PHP files on a local Apache Server (same machine or local network, google for "xampp"). NO INTERNET ACCESS NEEDED. The load script also saves already encoded texts into a Cache-file (QVD) and only uses the PHP Service for new upcoming texts in the source. This accelerates the reload time significantly.


    On my 4-Intel-core Notebook, QlikView script working together with the PHP service can encode up to 2000 codes/minute so if you put this on a server machine you can expect a remarkable performance.


    You can zoom smaller QR codes to the maximum size of the Barchart or use the same pixel size for all


    The PHP webservice has two modes of operation: return a PNG image, or return a text. The load script asks the webservice for the text rows (the come as n lines of binary codes like 111111100111001111111). Those n lines are stored in the datamodel and interpreted as bar segement colors in the barchart (1=black, 0=white).



    To print this to PDF, the settings of the bar chart need to be a little bit different than for best screen show (Allow thin bars =on, draw every bar = on). This allows the code to be printed in a high resolution (the code can be as small as a squareinch). See the test PDF export. This export works without any dependency on a webservice.



    The source code (QlikView script) is completely configureable by variables. You will find a lot of inline-remarks which explain their functionality. The example uses a top music list as a sample source table, but you won't have difficulties to replace this with any data table of yours, install Apache and the php files and get it go!



    Christof Schwarz