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

Dynamically adding RB components to Detail Band

edited June 2008 in General
Hi,

I am trying to create a bardcode for our inventory list. But, with my
limited knowledge on RB product, I found myself only be able to add one
barcode per detail band print.

What I would like to do is print multiple barcodes across the detail band
with each barcode matching the our inventory items. It would be similar
to the address label printing.

After playing around for few hours, I have done it with multple DBBarcode
components placed at the design time and playing with the visible property
at runtime.

It works but I would like it in a cleaner way and I think the cleaner way
is to dynamically add the barcode components at runtime.

So, I've tried

OnBeforeGenerate (detail band)
Barcode = TppBarCode.Create(detailband);
... set other properties..
DetailBand.AddObjects(BarCode);

But, that didn't work--it did not print the barcode. Also, I was getting
AV after closing the app with that code added.

So, my question is, is there a way to dynamically add components at runtime ?

TIA,

SeHun

--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited June 2008
    Please post using your real name, rather than shk. That is a requirement of
    these newsgroups.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.