Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Automated pdf reports

Hi,

We have a requirement where we need to store multiple pdf reports every night and and store it in a shared folder so that some other application can fetch those reports and share it across. I have prepared a qvw and reports inside it, but I am unable to save those reports in automated way.

Is the above mentioned scenario is possible in QlikView?? If yes then, can anyone please provide some sample scripts which could be useful to implement the given scenario?@

Thanks in advance.

Regards,

Sakir

1 Solution

Accepted Solutions
Not applicable
Author

Everytime the macro was running it was trying to save the document by the name of QlikView Printing.pdf, hence a pop was appearing. To overcome this scenario, below mentioned code could be used, it will create a new file and copy with a new name and then delete QlikView Printing.pdf".


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

Set objFSO = CreateObject ("Scripting.FileSystemObject")

'(string you determine the path and file name end)

tempFolder = "F:\Development\Reports\"


'(In the settings of your printer pdf should put the same address,ok?)

strForPathFile = tempFolder & DocumentID & "_" & Document_Type & ".pdf"

'(copy and paste the default file with the new name defined above)

objFSO.copyfile "F:\Development\Reports\QlikView Printing.pdf",strForPathFile, True

'(delete the default file that was used to copy)

 

objFSO.DeleteFile "F:\Development\Reports\QlikView Printing.pdf"

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

Hope this will help someone

Regards,

Sakir

View solution in original post

7 Replies
oknotsen
Master III
Master III

This was possible with the QlikView Publisher PDF distribution license.

Or you can do this with NPrinting.

Both without the need of "another application", though you do need a mail server of course.

May you live in interesting times!
Not applicable
Author

Hi Onno,

Thank you for your quick response.

We had suggested NPrinting to our customer but they do not want to move to NPriniting any time soon. So, QlikView is the only option we are left with.

Currently our only motive is to save pdf reports in a folder automatically. Could you please help with some macros or scripts which could be used for the same?

Regards,

Sakir

Not applicable
Author

Hi,

PDF Xchanger is being used in our Production Envoironment. I have found a snippet of macro and it is working to some extent. The only problem is every time it is creating a pdf a 'Save As' dialog box is opening. We do not want any manual intervention. Can anyone please have a look in the code a let  me know what is wrong in tis code?

sub printRP01

printReportPDF "F:\QV_Support\Development\Reports\Temp.pdf"

ActiveDocument.GetApplication.Sleep 2000

ActiveDocument.PrintReport "RP01", "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

Regards,

Sakir

Not applicable
Author

Everytime the macro was running it was trying to save the document by the name of QlikView Printing.pdf, hence a pop was appearing. To overcome this scenario, below mentioned code could be used, it will create a new file and copy with a new name and then delete QlikView Printing.pdf".


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

Set objFSO = CreateObject ("Scripting.FileSystemObject")

'(string you determine the path and file name end)

tempFolder = "F:\Development\Reports\"


'(In the settings of your printer pdf should put the same address,ok?)

strForPathFile = tempFolder & DocumentID & "_" & Document_Type & ".pdf"

'(copy and paste the default file with the new name defined above)

objFSO.copyfile "F:\Development\Reports\QlikView Printing.pdf",strForPathFile, True

'(delete the default file that was used to copy)

 

objFSO.DeleteFile "F:\Development\Reports\QlikView Printing.pdf"

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

Hope this will help someone

Regards,

Sakir

Not applicable
Author

hi,

You can do this via a Task in the QMC panel. Do you have access to the QMC?

Not applicable
Author

Hi Stuart,

Yes, I do have access to QMC and I have tried using publisher. But the problem is that the multiple report needs to be created based on different selection, I couldn't achieve this from QMC.

If you have any better approach, I would love to know.

Regards,

Sakir

upaliwije
Creator II
Creator II

Hi,

Could you pls share a sample application for me