Suppressing zero lines

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report where I may have up to twenty lines, my controls are
"Majorname", "CyNetChg", "CyBudget", "PYNetChg". If "CyNetChg", "CyBudget",
and "PYNetChg" are all zeros, I do not want a line to print. For example:

MajorName CyNetChg CyBudget PYNetChg

Taxes 0 12 -13
House 1 2 3
Yard 0 0 0

In this table, I would not like the line "Yard" to print. How can I
suppress this
 
Create a query. In the query, set the WHERE clause to exclude the all-zero
case, e.g.:
WHERE CyNetChg + CyBudget + PyNetChg <> 0
 
By applying criteria to the underlying query for the report so that the
"Line" isn't in the recordsource of the report.

If you can't change the query, then post back for some vba code that will
cancel printing a detail row.
 
This looks a bit like a spreadsheet....

You can create a column in your query with an expression like:
AllTotal:Abs(CyNetChg) + Abs(CyBudget) + Abs(PYNetChg) +....
Then set its criteria to >0
 
margaret said:
I have a report where I may have up to twenty lines, my controls are
"Majorname", "CyNetChg", "CyBudget", "PYNetChg". If "CyNetChg", "CyBudget",
and "PYNetChg" are all zeros, I do not want a line to print. For example:

MajorName CyNetChg CyBudget PYNetChg

Taxes 0 12 -13
House 1 2 3
Yard 0 0 0

In this table, I would not like the line "Yard" to print. How can I
suppress this


Create a query that filters those records out and base the
report on the query instead of table.
 
Back
Top