Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Below macro is working fine on my 32 bit machine. However, the macro gives a save as dialog on a 64-bit server. Any pointers?
Thanks,
Dinesh.
Below is the code:
Sub ExportReport
PrintPDF "C:\Report.pdf", "no"
ActiveDocument.PrintReport("RP01"), "Bullzip PDF Printer", false
End sub
Sub PrintPDF (pdfOutputFile, showFile)
set obj = CreateObject("Bullzip.PDFSettings")
obj.SetValue "Output" , pdfOutputFile
obj.SetValue "ConfirmOverwrite", "no"
obj.SetValue "ShowSaveAS", "never"
obj.SetValue "ShowSettings", "never"
obj.SetValue "ShowPDF", showFile
obj.SetValue "RememberLastFileName", "no"
obj.SetValue "RememberLastFolderName", "no"
obj.SetValue "ShowProgressFinished", "no"
obj.SetValue "ShowProgress", "no"
obj.WriteSettings True
END Sub
The problem was that my local PDF printer was also mapped to the server. Once I deleted my local machine printer mapping, the problem was resolved.
Thanks,
Dinesh.
Works fine on my Windows 7 64-bit machine.
Is this a Windows 2003->2012 server perhaps? Then you might have an issue with UAC.
The settings-file might need administration rights to be written.
Cheers
Yes this is windows 2003 server. I have opened up QlikView locally on the server (remote desktop) and tried testing. It is wierd that the dialog shows up on my local machine instead of a window within the remote desktop server.
Any thoughts?
Thanks,
Dinesh.
The problem was that my local PDF printer was also mapped to the server. Once I deleted my local machine printer mapping, the problem was resolved.
Thanks,
Dinesh.
Hi Dinesh,
we're having the same problem.
Our macro is quite similar to yours :
FUNCTION MyPrintPDFWithBullZip (pdfOutputFile)
set obj = CreateObject("Bullzip.PdfSettings")
obj.PrinterName = "Bullzip PDF Printer"
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
And we have a .bat file to execute that automatically in order to get our PDFs.
Sometimes the macro got stuck, and does nothing, specially when we execute the macro in an automatic mode.
I think it's because it sometimes show us a bothering "save as" dialog. It is supposed to be impossible because in our macro we say "showSaveAs" ,"never" :
Could you share to us how did you solve that issue??
Many thanks in advance!!
Regards, Marcel.
Where do you execute your macro? Presumably on the server? Please check what the default printer is on the server. Which ID is executing the macro? If it is a service account, login with that service account (and not your personal account) on the server and check the default printer. Make sure that there is only one bull zip printer mapped and that is the one which is default.
Thanks,
Dinesh.
Thanks Dinesh for your quick answer,
unfortunatelly I don't have the answer for all your requirements. I'm not as technical as you.
What we do is to execute a task on the server in “Run whether use is logged on or not” mode.
The task is executed by an user with admin full privileges on a server, as you said.
The point is that most of the times it works perfectly but there's few times that it doesn't work because gui.exe and qv.exe processes got hanged.
In our server, we have only 1 bullzip printer and that printer is the default printer. But how can we know which id is executing the macro??
We wrote to the support team of bullzip printers and they answered this :
"Are you controlling it from another program? The most common mistake is that you overwrite an existing runonce.ini before it was picked up.
Remember that the printing process is async. A job is sent to the spooler and the spooler decides when it is sent to the printer."
Many thanks in advance!
Regards, Marcel.
When the job is running, go to the task manager of the server and check which ID is running qv.exe. Now, kill all the hung qv.exe. Log into the server with the ID/password which is running the task and then run the task manually. Have you given this ID appropriate QLikView license (named user?)
Thanks,
Dinesh.
Yes, the job is executed by an user administrator with full privileges and also can manage qlikview files.
Regards, Marcel.
hi Marcel,
We are experiencing the same problem and haven't found a solution yet.
Would really appreciate it if you tell me how to fix the problem.
Thank you very much