Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Barcode printing - Unnecessary messages

edited June 2006 in General
HI,

We have a software for printing the barcode labels. It runs automatically.
Sometimes the data for printing are not correct and the software stops with
the message on the screen "The Code C portion must contain an even number of
digits". I think, if output device is not dtScreen you should not show this
message.

I have made for me the changes as follow:



ppUtils:

//Global Variables

gSilentMode: boolean: //added

gMessages: TStringList; // added

initialization

// added

gSilentMode := FALSE;

gSilentMessages := TStringList.Create;

finalization

// added

gSilentMessages.Free;



ppBarCodDrawCmd:

procedure TppDrawBarCode.DisplayMessage(aMessage: String);

begin

// added

if gSilentMode then begin

gSilentMessages.Add(aMessage);

exit;

end;

// added end



if FPrinting then Exit;



MessageDlg(aMessage, mtInformation, [mbOK], 0);



end;



So I can set silent mode and the messages write to my log-file.

Perhaps you can make similar changes in the next version J.



Regards

Marek

Comments

  • edited June 2006

    Thanks for the feedback. Are you printing to the printer? The intent is that
    in the following method, the FPrinting boolean be set to true so that no
    messages are displayed.


    procedure TppDrawBarCode.DisplayMessage(aMessage: String);
    begin

    if FPrinting then Exit;

    MessageDlg(aMessage, mtInformation, [mbOK], 0);

    end; {procedure, DisplayMessage}





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2006
    Yes, I print directly to printer. FPrinting is FALSE when the message
    appears.
    Please show this message only for dtScreen output.

    Regards
    Marek



This discussion has been closed.