Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kpatelacmm
Contributor
Contributor

Printing PDF's with a loop

I don't have the publisher server therefore i need to be able to print pdf's but i have a loop set up in my reports and really would like to be able to create a pdf for each loop. So i have a list of doctors and i need a PDF printout for each and an added bonus would to save the pdf's according to a specified naming convention.

13 Replies
ngulliver
Partner - Specialist III
Partner - Specialist III

Typically, NPrinting costs around a third the price of Publisher for the full NPrinting Enterprise addition which includes all the editing functionality and scheduling.

If the Vizubi link is unavailable, have a look at http://www.quickintelligence.co.uk/nprinting/

bumin
Partner - Creator II
Partner - Creator II

thanks, this is exactly what I am looking for

Not applicable

Hi Anders,

I'm trying to do something similiar using the cute PDF Writer. Basically I have 2 list boxes. I firstly select a value from List box x. This displays another list box, call it y. In list box y there is list of 40 values. I want to select a value then print to the cute PDF writer, saving it with a specified field value and saved in a specified location, then selecting the next value, and so on.

I've been trying to modify your code but not having much luck. I've put your code into notepad, saved it as .vba file. Then used the execute command in qlikview to bring the file in. Is this the correct way of doing this?

I'd like to be able to click on a button on the dashboard and the pdf's get printed and saved one at a time.

Any help would be much appreciated.


calvindk
Creator III
Creator III

Hi Adrian,

It helps if you go through the macros one at a time and get them to work individually.

You can open the macros in qlikview by using CTRL+M to see which macros are there and run them one at a time.

The above pasted is 4 different VB macros.

The looping part you are asking about is the easiest part, as that is only this part:

Sub YPrint()

ActiveDocument.ClearAll True

Set Y = ActiveDocument.Fields("Y").GetPossibleValues

For i = 0 to Y.count -1

    ActiveDocument.Fields("Y").Select Y.item(i).Text

     //-- once you get it working then add the printing part here

Next

ActiveDocument.ClearAll True

End Sub