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

Filtering groups according to a group total

edited September 2009 in RAP
I'm using RB11.05, RAP and D2009

I am trying to filter out groups in my report according to a total on
the report (conditionally calculated using a ppvariable).

I have put the ppVariable in the header and set it to look ahead. I
have set up the RAP code for the calculation which works fine.

When I preview the report it in the designer the page prints first and
then the total calculates while you watch it calculate on the screen. I
have then attempted to set up an on print event on the group to set the
visible property but to no avail.

Any ideas or am I not able to filter in this way. Do I need to do all
my filtering in the data before it gets to the report.

Thanks,
Kevin.

Comments

  • edited September 2009
    Hi Kevin,

    When creating two-pass reports, the first pass is used to make calculations
    and determine pagination and spacing. During the second pass, it is
    unfortunately too late in most cases to use the calculated information to
    "change" the report. An easier solution would be to filter your data before
    the report accesses it like you mention below.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2009
    Hi,
    I have RB 11.06 enterprise and I am struggling how to print page footer only
    on the first page. If I uncheck PrintOnLastPage, the footer will print on
    the first page only if the report has more than one page. I've also tried
    this code on Report.BeforePrint and Footer.BeforePrint:

    begin
    Footer.Visible := (Report.PageNo = 1);
    end

    No success. What I want to print is special bank notice for payment which is
    printed only on the first page at the bottom.

    Btw, I have found an interesting bug while printing on our HP LJ 3005x. If
    the report is larger than one page and I use duplex printing (no matter
    whether driver is PostScript or PCL6), then the first page printed is the
    last one and rotated 180°...?


    Best regards,
    Goran
  • edited September 2009
    Hi Goran,

    The Footer.BeforePrint event fires too late to hide the entire band. Try
    moving your code to the Report.StartPage event instead.

    The issue with the HP LaserJet is not known. Does this occur with a
    different printer or perhaps if printing to the Document Image Writer? Does
    this happen with every report even a simple trivial one?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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