I am trying to pull the SUM() from 2 subreports. It works for one subreport, however not for the other.
What I tried: I Sum() the field in the subreports, so I can refer to that field on the main report. However, for the test case I am trying, there are no records for one of the subreports, so I tried:
And I also tried :
Both give me the `#Name?` error when ran. I've tested `=[PayoutByYrLTTSb Rpt].[Report].[PytGross]` and it doesn't throw an error in design view, but when ran it does. That tells me it is an issue at run time because the report was able to find the fields I am referring to in design view (thus naming is correct).
For the subreport that is giving me trouble, I have :
><
What I tried: I Sum() the field in the subreports, so I can refer to that field on the main report. However, for the test case I am trying, there are no records for one of the subreports, so I tried:
Code:
=IIf([PayoutByYrLTTSbRpt].[Report].[NoRecords],0,[PayoutByYrLTTSbRpt].[Report].[LTtotal])
Code:
=IIf([PayoutByYrLTTSbRpt].[Report].[NoData],0,[PayoutByYrLTTSbRpt].[Report].[LTtotal])
And I also tried :
Code:
=IIf([PayoutByYrLTTSbRpt].[Report].[HasData], [PayoutByYrLTTSbRpt].[Report].[LTtotal],0)
For the subreport that is giving me trouble, I have :
Code:
Option Compare Database
Private Sub Report_NoData(Cancel As Integer)
Cancel = True
End Sub
Comment