Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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.
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
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
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
hi,
You can do this via a Task in the QMC panel. Do you have access to the QMC?
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
Hi,
Could you pls share a sample application for me