Calculations on subreports and reports

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

I have a subreport on my report. I do a calculation on
the report with data from the subreport. Everything works
fine assuming there is some data in the subreport. When
there is no data, I recieve an #Error on the main report.
I understand why this is happening, I need to find a way
to prevent the error from appearing in the instances of no
data on the subreport. I tried to do a simple If
statement in the control box:

=IF("#Error", 0, {my calculation})

Obviously this didn't work.

Any ideas?

Thanks
 
Adam said:
I have a subreport on my report. I do a calculation on
the report with data from the subreport. Everything works
fine assuming there is some data in the subreport. When
there is no data, I recieve an #Error on the main report.
I understand why this is happening, I need to find a way
to prevent the error from appearing in the instances of no
data on the subreport. I tried to do a simple If
statement in the control box:

=IF("#Error", 0, {my calculation})

Try this kind of expression:

=IIf(subreport.Report.HasData, subreport.Report.textbox, 0)
 
Back
Top