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

Barcode component

edited April 2002 in General
Using D5, RB 6.03
I am confused on setting a barcode component ( TppBarCode) at runtime.
The online help shows that the data property ( the logical property to which
to assign a run time variable says it is: "Run time and read only. Contains
data as retrieved from the database, which will be encoded". But wouldnt be
the tppDBBarcode used to get data from a database?
Have tried assigning to text and data, but cant get the barcode(TppBarCode)
to reflect information at runtime. Am i somehow ovelooking something
obvious?

Mark Grabowski
Polytop Corporation

Comments

  • edited April 2002
    Mark,
    probably you are making the barcode to small to print or something
    try dropping an ean13 and feed an existing ean13 to it (like on a coke can)
    you should see the same barcode
    normally it should work with the eyes closed
    maybe you'll have to provide more info in order to get to the bottom of the
    problem
    cu
    marc

  • edited April 2002
    I wish it was that simple.
    The component is clearly visible ( have to meeet a spec - its at least 3/4
    inch tall )
    I have no probs with the DB based component ( tppDBBarcode ).
    I cant seem to be able to use the tppBarcode component at runtime. It works
    fine (and is visible when i set the info at Design time ).
    However i need to be able to change it based on user input at runtime for
    this application. During runtime, no matter what i have tried so far, i cant
    make it change its information from what is set at design time ( in
    preview ).
    Like i said, what also confuses me formt eh help file is that the Data
    property is read only on a toobarcode, saying it gets its data from a (the)
    database. But the tppBarcode component is not based on a datasource! In my
    mind thats why the tppDBBarcode exists.

    MarkG


  • edited April 2002
    Mark,
    i'll give you a possible quck work-around
    i'de like to see your code to be able to detect the problem
    what you in the mean time could do is to use a memdataset or a clientdataset
    in wich you fill in the desired value
    hook a tppdatapipeline to it and use the TppDbbarcode component pointing to
    this record(s)
    this should help you get it working
    i'll try to mess around with the tppbarcode component later today
    cu
    marc

  • edited April 2002
    Mark
    i have made a test app and it works perfectly
    if you want it drop me a private mail!
    cu
    marc

  • edited April 2002
    Actually, that is a misprint in the help documentation. TppBarcode's Data
    property is published and therefore accessible to be set at runtime. Try
    encapsulating the changes to the varcode in BeginUpdate/EndUpdate calls.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited April 2002
    Hmm,
    Thats pretty much what i tried, just assigning to the data field.
    If it works for you and not me it must be something about win2k.
    Interesting though that if i run the program and click the button, the
    initial assignment is the same as what is already in the report. I get no
    error at this point. Just changing the value in the edit box - then doing
    the assignment causes the CPU debug window to come up, just as it did in my
    program.
    That alone is interesting, since if i get rid of teh defualt value in
    ppBarcode component, and then click on the button to assign it, it also
    crashes. Seems that the assignment really doesnt happen if the values on
    both sides are the same.

    The other interesting thing is that this problem only occurs within the IDE.
    I ran your sample outside the IDE and it was fine. Ran my program outside
    the IDE and it is fine as well.
    I wonder where the incompatability lies?
    MarkG



  • edited April 2002
    Hmm,
    i get the same error in the IDE even with the plain label component. when i
    try to update the text property. This problem is apparently not limited to
    the Barcode component. I havent had to do any updates to any of our in house
    programs/reports, but with some new customer requirements i am revisiting
    some of these older reports and am stumbling onto thses problems.
    I had a winME machine that i had to upgrade to WIN2K ( for some OPC stuff I
    am getting into ). After the upgrade soem programs had to be reinstalled -
    but the Delphi installation so far has been fine, with the exception of the
    report builder component. Any need to reinstall Report builder under win2k?
    or are there some compatabilty issues that wouldnt go away anyway?
    MarkG




  • edited April 2002
    Mark,
    i suggest you reinstall you machine from scratch
    i've seen problems with w2k upgrade (had some also)
    doing that all you soft will be reinstalled to
    also see my private mail about the cpu window if thats what worries you
    cu
    marc

This discussion has been closed.