count in parent report footer

  • Thread starter Thread starter seeker
  • Start date Start date
S

seeker

I posted the following in forms coding by mistake sorry.

I have a report that has two subreports. I want to take the count of each
subreport and show them in a textbox of the parent report in its report
footer. I have tried referencing a txtbox on each subreport that has
count([det:invoices]) in the control of the textbox in the parent report
footer with #name showing in those textboxes. I also need to do average cost
and subtotal, total tax and total receipt which takes data from each
subreport. Thank you.
 
seeker said:
I posted the following in forms coding by mistake sorry.

I have a report that has two subreports. I want to take the count of each
subreport and show them in a textbox of the parent report in its report
footer. I have tried referencing a txtbox on each subreport that has
count([det:invoices]) in the control of the textbox in the parent report
footer with #name showing in those textboxes. I also need to do average cost
and subtotal, total tax and total receipt which takes data from each
subreport.


The subreport total text box must be in the subreport's
Report Header or Footer section. Then the main report can
display that total in a text box **in the same main report
section as the subreport** by using an expression like:
=subreportcontrolname.Report.subreporttotaltextboxname

If there is any chance that the subreport might not have any
records to display, then you can avoid getting #Error by
using an expression like:

=IIf(subreportcontrolname.HasData,subreportcontrolname.Report.subreporttotaltextboxname,0)
 
Back
Top