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

BandsPerRecord

edited May 2004 in General
Hi!

I think this is not possible, but here I go...

I have some RTM files (without its own sql query) that obtains data through
a BDEPipeline, connected to a Table.
The table is a list of products with theirs stocks.
I want to print each record as times as the STOCK of each product.

For example, if the table contains:
MP3 PLAYER ------ 4
MOBILE PHONE ----- 2
MOUSE ---- 5
KEYBOARD ----- 1

I want to print 4 mp3 players, 2 mobile phones, 5 mice, etc......
Please, remember that they are rtm files. Can I use any Pipeline event?

Comments

  • edited May 2004
    Hi Santy,

    Unfortunately there are no pipeline events that allow you to control how
    many bands get printed per record. The pipeline will only traverse through
    your dataset once. Although I have never tried this, you may be able to use
    the Template.OnLoadEnd event to assign a specific DetailBand.BeforeGenerate
    method that sets the DetailBand.BandsPerRecord property based on the items
    in stock. You could also use RAP to keep the event code local to the
    template file. This would of course be the simplest solution.

    --
    Best Regards,

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

    I have solved the problem with the "OnRecordPositionChange" event of the
    Pipeline.
    Just tried this in this event:

    ppreport1.Detailband.BandsPerRecord :=
    Table1.fieldbyname('STOCK').asinteger;

    and it works!


This discussion has been closed.