I generate reports in PDF using VBScript.
Inside the report, it has a table and only when there is some value to show, the report is generated.
So, the idea is:
---- begin some code in VBScript
set doc = qv.OpenDoc("myQvwFile")
condition = doc.Evaluate("sum(myQvwField)")
IF condition > 0 then
doc.PrintDocReport("nameReport", "PDF Printer")
---- end some code in VBScript
The argument to Evaluate function is a Qlikview expression.
There are two ways:
- You can create an .vbs file. See the tutorial here: QlikView automation by external VBScript scripts
- You can put your code in the macro area: Tools - Edit Module. (of course, in this case, you cannot use the qv.OpenDoc, your document is already opened =P ).