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

Displaying n of y

edited April 2004 in RAP
When printing shipping labels, I have to print the same label lets say 3
times, and display 1 of 3, 2 of 3 and 3 of 3 on each of them respectively.
How can this be accomplished.

Thanks

-Jack

Comments

  • edited April 2004

    I created a simple example of this. I set Report.Detail.BandsPerRecord to 3
    so that the detail band will print 3 times for each record. I created a
    report on the customer data from DBDemos. I added a group on Company and
    added 2 TppVariable objects to the detail band. For varCount I set datatype
    to Integer and configured it to be reset when the group breaks and set its
    Visible property to False. For varPageDescr I used the default data type of
    string.

    I added the following code to the BeforeGenerate event of the detail band:

    var
    lsPageDescr: String;
    begin
    varCount.Value := varCount.Value + 1;
    lsPageDescr := 'Copy ' + IntToStr(varCount.Value)+ ' of ' +
    IntToStr(Report.Detail.BandsPerRecord);

    varPageDescr.AsString := lsPageDescr;
    end;


    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com



    Best regards,

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