Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to print my report

Hi there,

I have the below macro, which is intended to loop through all possible values in the "managerName" field and then print each of those files to the printer.

Currently, it stops after just one run through (rather than looping) and I cannot figure out how to get it to print (I have set up a report called Report1) - the printer name setup on my pc is CutePDF Writer (should print to PDF).

Can you help?

Thanks

sub SubmitReport

                Set val=ActiveDocument.Fields("managerName").GetPossibleValues(20000)

                For i = 1 to Val.count - 1

                ActiveDocument.Fields("managerName").Select val.item(i).Text

              

                ' Print Report

              

  ActiveDocument.PrintReport Report1, "CutePDF Writer"

               

                Next

                ActiveDocument.ClearAll true

                MsgBox ("loop done")

end sub

2 Replies
Not applicable
Author

Not applicable
Author

Thank you.

If I don't want to print to PDF, how would I send the report to a printer automatically?