Using Subreport Total in Main Report

G

Guest

Sorry to be re-hashing old information, but I am obviously doing something
wrong & cann't solve it even though I've looked through all the postings on
this issue.

Setup: A main report (Named "Report1") that contains Royalty information.
That would include length of time and required payments. There is an attached
subreport (named "SubRept1") that show all the payments made. This is
analogous to an invoice with multiple payments against it. I use the
subreport so the invoice does not get duplicated. I have also placed an
unbound text box (Named "subRoyaltyPayTotal") in the footer of SubRept1 that
totals all the payments.

Problem: I need to get the value of SubRept1.subRoyaltyPayTotal to the main
form so I can subtract it from the total roylaty due. If I set the record
source of an unbound text box on my main report to
[SubRept1].[subRoyaltyPayTotal] or [SubRept1].[Report]![subRoyaltyPay] I get
#ERROR in the box. There are values in the pay area and I understand the
HasData concept, but I just can't seem to move the sum of the subreport up to
the main report level.
 
M

Marshall Barton

Bill said:
Sorry to be re-hashing old information, but I am obviously doing something
wrong & cann't solve it even though I've looked through all the postings on
this issue.

Setup: A main report (Named "Report1") that contains Royalty information.
That would include length of time and required payments. There is an attached
subreport (named "SubRept1") that show all the payments made. This is
analogous to an invoice with multiple payments against it. I use the
subreport so the invoice does not get duplicated. I have also placed an
unbound text box (Named "subRoyaltyPayTotal") in the footer of SubRept1 that
totals all the payments.

Problem: I need to get the value of SubRept1.subRoyaltyPayTotal to the main
form so I can subtract it from the total roylaty due. If I set the record
source of an unbound text box on my main report to
[SubRept1].[subRoyaltyPayTotal] or [SubRept1].[Report]![subRoyaltyPay] I get
#ERROR in the box. There are values in the pay area and I understand the
HasData concept, but I just can't seem to move the sum of the subreport up to
the main report level.


Did you forget the = sign?

Ignoring the HasData aspect, I would expect this to work:

=[SubRept1].Report.[subRoyaltyPayTotal]
 
G

Guest

Marshall,

Thank you for the respnse. I did get this to work following your syntax. It
wasn't the equal sign, I think I didn't have the format correct referring to
the subreport.

Marshall Barton said:
Bill said:
Sorry to be re-hashing old information, but I am obviously doing something
wrong & cann't solve it even though I've looked through all the postings on
this issue.

Setup: A main report (Named "Report1") that contains Royalty information.
That would include length of time and required payments. There is an attached
subreport (named "SubRept1") that show all the payments made. This is
analogous to an invoice with multiple payments against it. I use the
subreport so the invoice does not get duplicated. I have also placed an
unbound text box (Named "subRoyaltyPayTotal") in the footer of SubRept1 that
totals all the payments.

Problem: I need to get the value of SubRept1.subRoyaltyPayTotal to the main
form so I can subtract it from the total roylaty due. If I set the record
source of an unbound text box on my main report to
[SubRept1].[subRoyaltyPayTotal] or [SubRept1].[Report]![subRoyaltyPay] I get
#ERROR in the box. There are values in the pay area and I understand the
HasData concept, but I just can't seem to move the sum of the subreport up to
the main report level.


Did you forget the = sign?

Ignoring the HasData aspect, I would expect this to work:

=[SubRept1].Report.[subRoyaltyPayTotal]
 

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