count in parent report footer

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.
 
M

Marshall Barton

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top