Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Inspecting QVD files at script runtime with QViewer

At script runtime many concatenations and joins are made to transform the data to Qlikview application. Sometimes we need to inspect the resulting data to check for example if joins are made correctly.

The QViewer application, powered by EasyQlik, it´s a good tool to inspect qvd data without dispose it at a table chart.

The tip of this post it´s a way to inspect this qvd files at script runtime.

1 ) First of all, you must to download and install the QViewer tool;

2) After that, create a script function like this.

SUB Inspect (TableName)

    //This line will be get current application path

    LET LocalAppDataPath = GetRegistryString('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', 'Local AppData');

    //This line will be get the install path to QViewer application

    LET QViewerPath = '$(LocalAppDataPath)\EasyQlik\QViewer\QViewer.exe';

    //This line stores the table into a qvd file

    STORE $(TableName) INTO [$(QvWorkPath)\~$(TableName).qvd] (qvd);

    //This one will execute QViewer passing the path to the previous stored QVD file

    EXECUTE "$(QViewerPath)" "$(QvWorkPath)\~$(TableName).qvd";

    //Finally, after user close QViewer the temporary QVD will be deleted and both paths cleared

    EXECUTE cmd /c del "$(QvWorkPath)\~$(TableName).qvd";

    LET QViewerPath = null();

    LET TableName = null();

END SUB

3) Give "Can execute external file" permission to your application like displayed above:

q.png

4) At your need call after a Table load statement:


Call Inspect('MyTable')

0 Replies