Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

about print qv-report to pdf with macro

hi guys.

im trying to print a qv-report to pdf with macro.

here a code i found from people post.

actually,they almost same.

Sub Dagrapport
vReport = "QVreportname" 'Set report
vName = "reportname" 'Name of output pdf
ActiveDocument.PrintReport(vReport), "Bullzip PDF Printer", false 'Printreport
reportFile = "reportpath" & vName &".pdf" 'Setting outputname
MyPrintPDFWithBullZip(reportFile) 'Call pdf printer
ActiveDocument.GetApplication.Sleep 5000
zendDagrapport
End sub

when i run this code, the script stop at ActiveDocument.PrintReport(vReport), "Bullzip PDF Printer", false 'Printreport

its just stop at this line any code i found. and no error info back to me.

-------------------------

32 bit machine

GhostScript , version is 9.0

BullzipPDF , version is 8.2(i guess....)

had installed the http://ftp.qliktech.com/QvWebDownloads/Release8/QvPDFSetup.exe

and set the system access to allow any macros.

Anyone got any ideas?

Thanks for your help !

Tags (3)
10 Replies
Not applicable

Re: about print qv-report to pdf with macro

Hi, Can't really comment as to what exactly the error is but just want to ask that for publishing pdf reports in QV we need to have qv pdf writer installed... again set the system access to allow any macros and meanwhile try out some other scripting also which can be found on qv community itself.. Kindly share the solution also.... Regards Gaurav

Not applicable

Re: about print qv-report to pdf with macro

you mean installed this?

http://ftp.qliktech.com/QvWebDownloads/Release8/QvPDFSetup.exe

yes, i installed already and set the system access to allow any macros.

rsvebeck
Valued Contributor

Re: about print qv-report to pdf with macro

Hi.

I have written a small paper on this subject, but it is in Swedish. I will translate it into english and post it to this thread.

Best Regards Robert

Not applicable

Re: about print qv-report to pdf with macro

Omg, thanks so much. 

rsvebeck
Valued Contributor

Re: about print qv-report to pdf with macro

Hi. Here it comes. Pardon the bad english, I just made a quck transaltion.... //Robert

Not applicable

Re: about print qv-report to pdf with macro

hi Robert Svebeck

thank you ,thanks for your pdf

i had learn more  from ur pdf, but that problems till there......

will more try on my own PC, too much restrict on company PC .........i guess

rsvebeck
Valued Contributor

Re: about print qv-report to pdf with macro

Hi.

This blog could perhaps be helpful for you:

http://qliktips.blogspot.dk/2012/02/printing-reports-to-pdf-using.html

Best Regards

Robert

stantrolav
Contributor II

Re: about print qv-report to pdf with macro

Hi! Mabye there is some mistake in this macro from your PDF:

sub Check_if_send_mail

set var = ActiveDocument.Variables("vMailReports").String

if val = 1 then

call Print_and_mail_Report

ActiveDocument.ClearAll

var.SetContent 0, true

activedocument.closedoc

ActiveDocument.GetApplication.Quit

end if

End Sub

hencovanee
Contributor II

Re: about print qv-report to pdf with macro

Hi Robert,

Thanks a lot for the explanation. It works fine for me.

Actually I changed the Check_if_send_mail a bit, because I got an error.

The functionality works fine, I have only one problem left. When I open the QV document in Accesspoint I get this error: Macro parse failed. Functionality was lost.

OnOpenDocument

Error: Types doesn't match '[string. ''']'

Version installed: 11.2 SR3.

I hope you can help me on this.

Kind regards,

Henco

Community Browser