Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple reports in one pdf file

Hi. i would like to put multiple reports into a file .pdf

Sub printRP01

Set reps = ActiveDocument.GetDocReports

For i = 0 to reps.Count - 1

Set rep = reps.Item(i)

ActiveDocument.PrintReport rep.id

Next

End Sub

'===========================================================================

sub printRP02

printReportPDF "C:\Temp\18T.pdf"

ActiveDocument.GetApplication.Sleep 2000

ActiveDocument.PrintReport "RP01", "QlikviewPDF"

ActiveDocument.SaveAs strRepPath & "teste" & i, 0

ActiveDocument.GetApplication.Sleep 10000

end sub

'===========================================================================

Function printReportPDF(pdfOutputFile)

Set WSHShell = CreateObject("WScript.Shell")

WSHShell.RegWrite "HKCU\Software\QlikviewPDF\OutputFile", pdfOutputFile, "REG_SZ"

WSHShell.RegWrite "HKCU\Software\QlikviewPDF\BypassSaveAs", "1", "REG_SZ"

Set WSHShell = nothing

End function

'====================================

The problem is:

I dont know why, but the pop up window appears, and i dont like.
and the second and must important this code add 3 .pdf files. But i need the 3 .pdf in one unique file

2 Replies
Not applicable
Author

Hi,

Popup window is actually the sign of progress.

regarding 3 pdf files

you are calling the ActiveDocument.PrintReport in a loop and i guess you have 3 reports thus, loop occurs for 3 times and it creates 3 separate pdf files.

you need to add these into same report and just call this ActiveDocument.PrintReport once.

ex:

if you have 6 charts in 3 reports ie 2 charts in one report then 3 pdf will be generated, append charts in same report in next sheet to get one pdf.

Regards,

Shubhu

Not applicable
Author

Hi shubhu

How do you put the three reports in a single report?

I have a report for sheet and I need to create a pdf with the many reports on it.

For the window pop up on the save, is there any solution?