Namely, how do I handle this?
I have a report that calculates square footage of waste at our plant. It has a Subreport in it that displays the waste by type (how much of item A did we throw away, how much of item B, etc.).
Below the Subreport is a section where several totals are calculated:
- Total square footage processed during the day
- The total square footage wasted during the day
- The percentage of square footage wasted during the day
The problem is, that if we miraculously had a day with no waste, all the fields except the first one display #Error.
How can I check to see if the Subreport has data and, if it does, use 0 instead of trying to use the sum of all the waste displayed in the Subreport?
I've attached two images, one where everything works (the Subreport has data) and one that doesn't (the Subreport is empty).
Note: The Subreport looks at a different Table/Query than the main Report.