Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to avoid error when sub report doesn't return any rows 1

Status
Not open for further replies.

sjh

Programmer
Oct 29, 2001
263
US
Hi, I have a main report which has two sub reports. In the report footer, I have a row which sums up the total from the two sub reports.

Record Source Property
=rsubConstruction.Report!txtSum1+rsubCapital.Report!txtSum1

But if any of the sub report doesn't return any data, it prints out "#ERROR".

Is there a way to avoid this from happening?

Thank you!!!!

SJH
 
SJH
Take a look at the HasData property.

For example, here is an expression for a text box
=IIf([YourSubReport].[Report].[HasData]=-1,[YourSubReport].[Report]![txtBox],0)


Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top