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

Barcode component will not accept Chr(175)

edited February 2004 in General
With this code

ppBarCode.Data := FCaseID +
DM.ADOAddrChg.FieldByName('ClaimID').AsString +
FChkDig + FMod;

if FMod is the character 175 (Chr(175) ), the barcode will not print.
Is there a workaround?

Todd

Comments

  • edited February 2004
    Todd,

    Which version of ReportBuilder are you using? Are you seeing this on screen
    and on paper? Also, does this issue occur with every type of barcode or
    just a certain type (ie. UPC-A, Code 128)? In my testing with the code
    below, I was able to get a barcode to show up in the report preview and on
    paper.

    procedure TForm1.Button1Click(Sender: TObject);
    var
    aData: String;
    begin

    aData := 'Nico Cizik';

    ppBarCode1.Data := aData + Chr(175);

    ppReport1.Print;
    end;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2004
    I am running version 7.02 with Delphi 5 on a Windows 2K platform.

    It does not show up on the screen or on paper; all other barcodes print
    correctly. Here is the debug output for this particular combination
    (the MOD 24 = 38):

    2/9/2004 8:59:36 AM: [DoClaimantQry] Query: 1071985
    2/9/2004 8:59:38 AM: [MakeCkDigit] Input: 1071985
    2/9/2004 8:59:38 AM: [MakeCkDigit] Output: 7
    2/9/2004 8:59:38 AM: [MakeMODDigit] Input: 10719857
    2/9/2004 8:59:38 AM: [MakeMODDigit] Output: ¯
    2/9/2004 8:59:38 AM: [ppBarCodePrint] SEIU110719857¯

    Here is the procedure:

    procedure TFormRB.ppBarCodePrint(Sender: TObject);
    begin
    ppBarCode.Data := FCaseID +
    DM.ADOAddrChg.FieldByName('ClaimID').AsString +
    FChkDig + FMod;
    if IniRec.DoDebug then
    LogIt(IniRec.DebugFile, '[ppBarCodePrint] ' + FCaseID +
    DM.ADOAddrChg.FieldByName('ClaimID').AsString +
    FChkDig + FMod);
    end;



    Hope this helps.....

    Todd

  • edited February 2004
    Nico -

    My previous message should have read, MOD 43 = 38. And a value of 38 is
    set to Chr(175) as you can see by the "upside down underscore".

    Todd

  • edited February 2004
    Hi Todd,

    If you simply add Chr(175) to the data of the barcode directly and by
    itself, can you see the barcode? As a test, try taking every thing out of
    the data property except for the upside down underscore and see if you get
    the same results.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2004
    Nico -

    I added the following and the barcode does not display or print:

    procedure TFormRB.ppBarCodePrint(Sender: TObject);
    begin
    (*
    ppBarCode.Data := FCaseID +
    DM.ADOAddrChg.FieldByName('ClaimID').AsString +
    FChkDig + FMod;
    *)
    ppBarCode.Data := Chr(175);
    if IniRec.DoDebug then
    LogIt(IniRec.DebugFile, '[ppBarCodePrint] ' + FCaseID +
    DM.ADOAddrChg.FieldByName('ClaimID').AsString +
    FChkDig + FMod);
    end;


  • edited February 2004
    Todd,

    I am having trouble reproducing this one. I'm testing with RB 7.03, Delphi
    5, Windows 2000 machine. My test app consists of a report and a button on a
    form. The report only contains a TppBarCode object in the detail band.

    My Code is as follows...

    procedure TForm1.ppBarCode1Print(Sender: TObject);
    begin
    ppBarCode1.Data := Chr(175);
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    ppReport1.Print;
    end;

    This is literally my entire "implementation" section and when I print the
    report, the barcode seems to show up correctly. Please update to RB 7.03
    and test with that. If you can think of any other way our configurations
    are different, please let me know.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.