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

Skip record

edited March 2012 in General
Hi,
how can I skip a record in detailband, if a condition is true.
Is there any function, like NextRecord, in BeforeGenerate ?


What I got:
Date Booking
01.01.2012 Work
02.01.2012 Work
03.01.2012 Work
03.01.2012 Work
04.01.2012 Work
04.01.2012 Break
05.01.2012 Work

What I want:
Date Booking
01.01.2012 Work
02.01.2012 Work
03.01.2012 Work
04.01.2012 Work
04.01.2012 Break
05.01.2012 Work

My if condition:
if (DBDate.PriorValueSame) and (not(DBBooking.PriorValueSame)) then
// next record;

Comments

  • edited March 2012
    Hi David,

    The easiest way to do this would be to filter out the record before it
    is given to ReportBuilder using SQL. If this isn't possible, you can
    try using the BeforeGenerate or BeforePrint event of the detail band to
    check the field value, then toggle the visibility of all components
    inside the band. You will also need to be sure the detail band
    PrintHeight is set to phDynamic.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2012
    Hi Nico,
    thanks it works.
    Have a nice day
This discussion has been closed.