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

how surpress page printing if ...

edited October 2001 in General
Hello:

I have an Accounts Receivable app which prints monthend statements of
account for all of our customers.

What I would like to do is NOT print those statements whose balance is zero
or less. I have a ppdbcalc component in the group footer which prints the
total - if this total is zero or less, I want to skip printing this
statement. A customers statement maybe longer than one or two pages.

I have tried:

if ppdbcalc4.Value <= 0 then StatementsPipe.Skip;

in various events but no luck.

Any ideas would be appreciated.

Thanks,

Rob.
--------------------------------
A. Robert Thompson
Montreal, Quebec, Canada
-------------------------------------------
Delphi 5 Ent, IB6, BDE 5.11, dBase & Paradox tables, Win 98, Win NT
Server, ReportBuilder, InfoPower.

Comments

  • edited November 2001
    just set the visibility property of the band to false (in the beforeprint
    event of the band)...
    thats how i do it
    cu
    marc

  • edited November 2001
    Hi Marc:

    Your idea only prevents the band's contents from being visible. What I want
    to do is skip the printing of the entire statement if the ppdbcalc component
    in the group footer is zero or less.

    Said another way, I want to surpress the printing of any customer's
    statement if the customer owes us $0.00 or less. If we owe him money, I
    don't want to advertise the fact.

    Any further suggestions would be appreciated.

    Rob.
  • edited November 2001
    It may be easier to do this on the data side, before the report is run. On
    the detail query, add to the sql where clause so that it does not pull a
    record if the field value is zero or less. In your case, you will want a
    calculated field to sum the value for each customer, and then check for the
    calc field value to be zero or less.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited November 2001
    Thanks Jim, this is what I have done.
This discussion has been closed.