How suppress detail line if condition met

  • Thread starter Thread starter SteveL
  • Start date Start date
S

SteveL

How can I suppress the printing of a line of detail on a
report if a certain condition is met on that line? In
other words, I have a calculated field on the line and if
the answer is <=0 then I want the entire line of detail
suppressed.

--Steve
 
The way I would approach that is to base the report on a
query and simply filter the query.
Hope that helps.
Fons
 
If filtering at the query level as suggestted in the
previous reply doesn't work for you, set up each textbox
on the detail line to be something like this:

=IIf([Answer]<=0,"",[FieldToShow])

Set CanShrink = Yes for both the textbox and detail
level. If you have labels on the line as well, you'll
need to change them to textboxes like this:

=IIf([Answer]<=0,"","LabelToShow")

With this approach, everything on the detail line should
be blank if the answer is <= 0. All of the textboxes
will shrink to nothing along with the entire detail level
and effectively make the line disappear from your
report. HTH....Eric
 
You might also be able to suppress that in the query.
Create the calculated field in the query and then use your
criteria to eliminate those lines.

Select fielda, fieldb, fieldc, (fielda + fieldb)*fieldc
from table1
Where ((fielda + fieldb)*fieldc)>0
 
Back
Top