Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sending pdf reports

hi i have 2 dim as drill down i want to send reports as pdf what could be the action in desktop vesion not in publisher

2 Replies
arsal_90
Creator III
Creator III

Hi Venu

You can use macro to sending your qv objects into word or excel and is it necessary to send your object to pdf report or it is feasible if i provide the macro that transfer your QV objects into Word and excel file.

arsal_90
Creator III
Creator III

Please follow this for pdf report

1. Install Bullzip PDF Printer (I tried CutePDF, PDF X-change, PdfCreator,.. bullzip is the only one that works)

2. Macro :

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

FUNCTION MyPrintPDFWithBullZip (pdfOutputFile)

set obj = CreateObject(“Bullzip.PDFPrinterSettings”)

obj.SetValue “Output” , pdfOutputFile

obj.SetValue “ConfirmOverwrite”, “no”

obj.SetValue “ShowSaveAS”, “never”

obj.SetValue “ShowSettings”, “never”

obj.SetValue “ShowPDF”, “no”

obj.SetValue “RememberLastFileName”, “no”

obj.SetValue “RememberLastFolderName”, “no”

obj.SetValue “ShowProgressFinished”, “no”

obj.SetValue “ShowProgress”, “no”

obj.WriteSettings True

END FUNCTION

‘===========================================================================

‘===========================================================================

function zendDagrapport()

Dim objEmail

Const cdoSendUsingPort = 2 ‘ Send the message using SMTP

Const cdoAnonymous = 0 ‘Do not authenticate

Const cdoBasic = 1 ‘basic (clear-text) authentication

Const cdoNTLM = 2 ‘NTLM

SMTPServer = “IP Mailserver”

Const SMTPPort = 25 ‘ Port number for SMTP

Const SMTPTimeout = 60 ‘ Timeout for SMTP in seconds

‘Sending mail

Set objEmail = CreateObject(“CDO.Message”)

Set objConf = objEmail.Configuration

Set objFlds = objConf.Fields

With objFlds

‘---------------------------------------------------------------------

‘ SMTP server details

.Item(“http://schemas.microsoft.com/cdo/configuration/sendusing”) = cdoSendUsingPort

.Item(“http://schemas.microsoft.com/cdo/configuration/smtpserver”) = SMTPServer

.Item(“http://schemas.microsoft.com/cdo/configuration/smtpauthenticate”) = cdoAnonymous

.Item(“http://schemas.microsoft.com/cdo/configuration/smtpserverport”) = SMTPPort

.Item(“http://schemas.microsoft.com/cdo/configuration/smtpusessl”) = False

.Item(“http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout”) =

SMTPTimeout

.Update

‘---------------------------------------------------------------------

End With

objEmail.To = “to emailaddress” ‘Email Recipient

objEmail.From = “from emailaddress” ‘Email Sender

objEmail.Subject = “emailsubject” ‘ Subject

objEmail.TextBody = “emailbody” ‘Text Body

end function

i will provide the macro for word and excel file by night and attache you can find the word file that transfer your object into jpg