Hi all
I am using the following code to create a PDF file:
Filename := 'C:\Temp\' + Customer."no." + '.pdf';
IF ISCLEAR(BullZipPDF) THEN
CREATE(BullZipPDF);
BullZipPDF.Init;
BullZipPDF.LoadSettings(TRUE);
BullZipPDF.SetValue('Output',Filename);
BullZipPDF.SetValue('Showsettings', 'never');
BullZipPDF.SetValue('ShowSaveAS', 'never');
BullZipPDF.SetValue('ShowPDF', 'no');
BullZipPDF.SetValue('RememberLastFolderName', 'no');
BullZipPDF.SetValue('RememberLastFilename', 'no');
BullZipPDF.SetValue('ShowProgress', 'no');
BullZipPDF.SetValue('ShowProgressFinished', 'no');
BullZipPDF.SetValue('SuppressErrors', 'yes');
BullZipPDF.SetValue('ConfirmOverwrite', 'no');
BullZipPDF.WriteSettings(TRUE);
CLEAR(CustomerReport);
CustomerReport.USEREQUESTFORM(FALSE);
CustomerReport.SETTABLEVIEW(Customer);
CustomerReport.RUNMODAL;
CLEAR(BullZipPDF);
The code works as it is, and it generates the PDF files according to the number of customers in the filter (filter not shown). But now I want to change the folder and filename to e.g.
Filename := 'C:\PDF\CustomerReport ' + Customer."no." + '.pdf';
But the file(s) are saved in the old folder (C:\Temp) and with the old file names. I have added
BullZipPDF.SetValue('RememberLastFolderName', 'no');
BullZipPDF.SetValue('RememberLastFilename', 'no');
which was not in my first version of the code but without any luck. I have also tried these steps:
Delete the runonce.ini file
Use the RemoveSettings value
Use the RememberLastFolderName and RememberLastFileName values
Can anyone help me "resetting" the Bullzip driver at each run or suggest another solution to my problem?
Thanks in advance!
AJ
0
Comments
FullBullZipFilePath := -->input your file pate and filename
BullZipPDF.Init;
BullZipPDF.LoadSettings;
RunOnceFile := BullZipPDF.GetSettingsFileName(TRUE);
BullZipPDF.SetValue('Output',FullFilePath);
BullZipPDF.SetValue('Showsettings', 'never');
BullZipPDF.SetValue('ShowPDF', 'no');
BullZipPDF.SetValue('ShowProgress', 'no');
BullZipPDF.SetValue('ShowProgressFinished', 'no');
BullZipPDF.SetValue('SuppressErrors', 'yes');
BullZipPDF.SetValue('ConfirmOverwrite', 'no');
BullZipPDF.WriteSettings(TRUE);
I found the problem. 2 reports looked alike and the code called the wrong report :oops:
Thaks for input!
AJ