Category

Saturday, July 13, 2013

CSV Reports from Qlikview Dashboards

I recently came across a requirement where in the client wanted us to automate daily email delivery of a csv/excel file containing data of a straight table from one of the Qlikview app. Obviously, Qlikview publisher has the capability to create and email pdf reports from Qlikview apps, but it does not have options to create csv/excel reports. We started evaluating multiple options to achieve the requirement.

We coded a macro to export the table into excel file and created a trigger to execute macro code on Post Reload of the app and later use a batch file to email the excel file using sendemail.exe .


The trigger appears to work when the app is refreshed manually through Qlikview desktop. However, when the refresh is triggered through publisher tasks, the trigger doesn't work.

After trying many unsuccessful workarounds, we decided its time think other ways to achieve the requirement.
One of the idea that came from my colleague is to create the csv file using load script in the Qlikview app. That sounds simple and does not require any complex macro script and triggers!!

We modified the load script to create a Qlikview table in the app with data required for reporting. Then added store command to save the file with .csv extension on the server.

We created tasks on publisher to reload the app and while reloading the app , it creates a csv file on the server. We created batch file for emailing the .csv report to user and set up the dependency on the app reload and email script using enterprise scheduling tool like OpsWise or Control-M.

The method has its limitation but works like charm for simple requirements. Feel free to comment any suggestions to improve the process or any other ways to achieve it.
There are third-party tools like NPrinting which enables rich and advanced reporting features with excel and many other formats. But, comes with a cost.

6 comments: