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

Print first N records on each group

edited August 2003 in General
Hi there,

I got a result set with about 1,000 records. Data is the result of a GROUP
BY query and I've set a correspondent group in my TppReport.

Question is, how can I print only the first 10 records of each group, if
possible?

Thanks in advance,

-Jorge

Comments

  • edited August 2003
    Hi Jorge,

    This is possible by creating a TppGroup around the grouped field of your
    dataset. Next you would need to keep track of how many detail bands have
    been printed. You could do this by placing a count variable in the
    DetailBand.BeforePrint event. Once the count reaches 10, you will need to
    set the visibility of the DetailBand to False. Finally in the
    Group.AfterGroupBreak event you can set the visibility of the DetailBand
    back to True and begin the entire process over again.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.