Bullzip

Hi Folks,

situacion (my client still uses 2009R2 classic) :

I have a Report who prints Sales Invoices. To Print them with Bullzip i have this code, that you find in many places on aftergetrecord


Bullzip Version 14.5.2974

CODE:
----

IF ISCLEAR(BullZipPDF) THEN
CREATE(BullZipPDF);

SalesInvoiceHeader.GET("Sales Invoice Header"."No.");
SalesInvoiceHeader.SETRECFILTER;
SalesInvoice.SETTABLEVIEW(SalesInvoiceHeader);
SalesInvoice.USEREQUESTFORM(FALSE);

PDFFileName := Path + SalesInvoiceHeader."No." + '.pdf';

BullZipPDF.Init;
BullZipPDF.LoadSettings;
BullZipPDF.SetValue('Output','PDFFileName'); //only example, better to use timestamp
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);
SalesInvoice.RUNMODAL;
BullZipPDF.RemoveSettings();
CLEAR(BullZipPDF);


----

My problem is, that when i run the code without a SLEEP, than it will create one document less than i print and the document that is created is one number bigger.

Example:
Sales Invoice 1001 -> is created as 1002
Sales Invoice 1002 -> is created as 1003
Sales Invoice 1003 is missing

Without SLEEP sometimes it does not create anything. Sometimes, when i try to change the setting (i still dont know which one makes des "different") in thew Bullzip Printer Settings as a User, it creates Files in the defined folder with the use of <date>-<time> - <docname>.pdf, but the docname is the name of report.

define <date>-<time> - <title>.pdf with BullZipPDF.SetValue('title', 'blabla'); does not chanmge anything!#

It seems, that all the settings i set in the code do only affect the BullZipPrinter when running with SLEEP

Any Ideas?

Answers

  • vaprogvaprog Member Posts: 1,140
    I suppose
    BullZipPDF.RemoveSettings();
    
    alters the configuration for the current and all pending print jobs.

    Check out the PdfStatus Class of the BullZip automation interface and see, if this can help you wait until pending jobs are completed.
Sign In or Register to comment.