The error arises where you have calculated controls that refer to
non-existent fields. You can avoid the error by testing the HasData property
of the report.
For example, if you have a text box that has a Control Source of:
=[Quantity] * [PriceEach]
when there is no data, there is no quantity and no price each, so trying to
refer to them yields #Error.
To avoid the problem, change the ControlSource to:
=IIf([Report].[HasData], [Quantity] * [PriceEach], 0)
Note that another cause of #Error on a report is where the Name of a control
is the same as a field, but its Control Source is something else. You may
also need to change the Name of the text box to avoid the #Error.