Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Re : Macro to generate PDF

Dear All,

Anyone please help me to fix the following issue:

i used to generate pdf reports through macro and it was running successfully. and it was triggered post reload. when i go to report--> print reports the pdf generation is happening using PDF exchange 3.0. But automation of PDf report generation by using QlikViewPDF is not working through Macro after the reload.

I checked devices and printer in control panel, there is no queue of tasks that is empty.

Whenever macro is running it is showing printing report in QlikViewPDF printer then application hangs.

kindly help me to fix the issue.

Tags (1)
4 Replies
Highlighted

Re: Re : Macro to generate PDF

can you please share the macro code ?? check whether QlikViewPDF is installed and working properly

Highlighted
Not applicable

Re: Re : Macro to generate PDF

yes..when i do manually through Report->(ReportName)-->Print,  i am able to do Generate the PDF Report.

Highlighted

Re: Re : Macro to generate PDF

I think the issue is with the Macro code ....check with that once ??

it should be something like this

Sub GWP_Macro4r_Email

'...........PDF Export logic.............QlikViewPDF

ActiveDocument.clearall
path="\\inmchn24\ChannelMIS\Centrlal MiS\Daily Reports\Automated Reports\"
'path="D:\Qlikview\Report\"
ActiveDocument.PrintDocReport ("RP01"),"QlikViewPDF", false
set rep = ActiveDocument.GetReport("RP01")
reportFile = path & "SRO_GWP_Dashboard"&".pdf"
printReportPDF(reportFile)

ActiveDocument.GetApplication.Sleep 16000

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

Highlighted
Not applicable

Re: Re : Macro to generate PDF

Dear Avinash,

The macro is working fine for more than a year the application is functioning and generating the report with the same macro code.

but suddenly one day it stopped working and manually the report can be generated.