BarCode

Hi !!!

I have a problem to change the Barcode type at runtime.

In the frxReport1 code section if I set

BarCode1.BarType := bcCode39;

it's work fine...

but [img]style_emoticons/<#EMO_DIR#>/mad.gif" style="vertical-align:middle" emoid=":angry:" border="0" alt="mad.gif" /> if I pass a custom variable BarCode1.BarType := <BARCODETYPE>; I become this message Could not convert Variant of type (String) into type (Boolean). I test my custom variable with a memo and no problem ... its display bcCode39 The custom variable <BARCODETYPE> is a string that comes from another form and from a stringlist. How I can solve the problem ? Thanks in advance ![/img]

Comments

  • edited June 2011
    BarType is not of type String

    try this:
    if <BARCODETYPE> = 'bcCode39' then
      BarCode1.BarType := bcCode39
    else if <BARCODETYPE> = 'bcCode128A' then
      BarCode1.BarType := bcCode128A;
    
  • edited 5:50PM
    Peta wrote: »
    BarType is not of type String

    try this:

    if <BARCODETYPE> = 'bcCode39' then
      BarCode1.BarType := bcCode39
    else if <BARCODETYPE> = 'bcCode128A' then
      BarCode1.BarType := bcCode128A;
    



    Thanks mate... it's work fine :lol:" border="0" alt="laugh.gif" />" alt=">" />
  • edited 5:50PM
    yanvan2002 wrote: »
    Hi !!!

    I have a problem to change the Barcode type at runtime.

    In the frxReport1 code section if I set

    BarCode1.BarType := bcCode39;

    it's work fine...

    but [img]style_emoticons/<#EMO_DIR#>/mad.gif" style="vertical-align:middle" emoid=":angry:" border="0" alt="mad.gif" /> if I pass a custom variable BarCode1.BarType := <BARCODETYPE>; I become this message Could not convert Variant of type (String) into type (Boolean). I test my custom variable with a memo and no problem ... its display bcCode39 The custom variable <BARCODETYPE> is a string that comes from another form and from a stringlist. How I can solve the problem ? Thanks in advance ![/img]


    Good question,
    nice info
    Thanks

Leave a Comment