BarCode

edited 12:08AM in FastReport 4.0
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 12:08AM
    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 12:08AM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.