I'm using Bullzip to generate pdf-documents, through the NAS (Application Server).
To set the filename of the pdf-file, following code is used
autBullzip.Init;
autBullzip.LoadSettings;
txtRunOnceFile := autBullzip.GetSettingsFileName(TRUE);
autBullzip.SetValue('Output',ptxtPDFFileName);
autBullzip.SetValue('Showsettings', 'never');
autBullzip.SetValue('ShowPDF', 'no');
autBullzip.SetValue('ShowProgress', 'no');
autBullzip.SetValue('ShowProgressFinished', 'no');
autBullzip.SetValue('SuppressErrors', 'yes');
autBullzip.SetValue('ConfirmOverwrite', 'no');
autBullzip.WriteSettings(TRUE);
As said before, this code is executed through the NAS.
Now the issue: in order to generate the pdf, with the correct filename & location
I have to restart the NAS-service. When I don't restart the service, the document is generated automatically, but without the correct filename (Bullzip uses the name of the report as filename). After restarting the NAS-service, the correct filename is being used (for example: INV123.PDF).
Does anyone has a clue what is causing this behaviour?
Answers
The code is only executed through NAS. But when the machine (VPC) is started, the code does not work correctly. When I restart the NAS-service, the code works correctly. ](*,)
I added in my code, to see (in the Event Log), what file Bullzip was using to store the settings.
When the server (VPC) is started, the result of txtRunOnceFile is:
C:\Documents and Settings\Administrator\Bullzip\PDF Printer\runonce@Bullzip PDF Printer.ini.
When the NAS-service is restarted, the result of txtRunOnceFile is:
C:\Documents and Settings\Administrator\Application Data\Bullzip\PDF Printer\runonce@Bullzip PDF Printer.ini.
:-k
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.