Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create a pdf file for the active sheet?

Hi all,

How to create a pdf file for the active sheet including all corresponding sheet objects.

If it is possible,

Please let me know your responses on this post.

Thanks in advance for any quick response.

Regards

Kumar

10 Replies
Siva_Sankar
Master II
Master II

Are you tryint to export the sheet objects to pdf?

Not applicable
Author

hi

in your script write this code.

STORE Sheet1 into ;

here sheet1 is table name.

Not applicable
Author

Hi Vishwaranjan,

I need a macro to export the active sheet (Including corresponding sheet objects in that sheet) from UI.

Thanks for the response

Regards

Kumar

Siva_Sankar
Master II
Master II

refer the following link,it will help. http://community.qlik.com/message/126410#126410 Regards. Siva Sankar K

Not applicable
Author

hi

use it

sub pdf

printReportPDF "C:\Test\test28.pdf"

ActiveDocument.GetApplication.Sleep 2000

ActiveDocument.PrintReport "Report1", "QlikviewPDF"

ActiveDocument.GetApplication.Sleep 10000

end sub

hope it helps you

Not applicable
Author

Hi Viswaranjan,

Can you please attach a sample file.

Regards

Kumar

Not applicable
Author

hi try it

sub pdf

printReportPDF "C:\Test\test28.pdf"

ActiveDocument.GetApplication.Sleep 2000

ActiveDocument.PrintReport "Report1", "QlikviewPDF"

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

*********************************

then allowing system access in macro and  on sheet press ctri+shift+M there choose system access.

Not applicable
Author

Vishwaranjan,

if we create the report manually then that report will export as a pdf file and it is fine.I have already worked like that.

I have tried like by taking the scrrenshot of the sheet and create a report with that image manually and finally the pdf file is missing the clarity of the actual image.

But how to create the document report dynamically with activesheet(whole sheet including all objects) just like an image.

I am expecting any help on this one.

Regards

Kumar

Not applicable
Author

hi

see the attached file

hope this helps you.