Getting a total out of a sub-report

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I have two tables, Donors, Donations
I have a form where I enter the Donor information and it has a sub form
where I enter the related donations for that donor.
I have a report for that donor and a sub report for the donor listing their
donations.

First Problem:
In the sub report on the page footer section I have a text box named
[ItemTotal] with this code for the control source: =Sum([ItemValue]) however
when I run that report I do not get a total. Yes, [ItemValue] is the correct
name.

Second Problem:
I'm trying to display the results of the ItemTotal text box, when I can get
it to produce results, on the main donor report. I did this by creating a
text box with this code: =[Reports]![Donated Items SubReport]![ItemTotal] and
again this does not work.

Any thoughts?

Thanks,
Scott
 
I'm not sure why you would place a subreport in a Page Footer. Is ItemValue a
field in the record source of the subreport? What section of the subreport
contains the Sum()?

You should be able to pull a value from a subreport into the main report
with a control source like:
=subrptCtrlName.Report.ControlNameOnSubreport
 
There is no report footer???? I opened the report in design mode and there
is a page footer. Access 2007 working on a Access 2003 database.

Tammy F said:
It cannot be in the page footer - put it in the report footer.

Scott said:
I have two tables, Donors, Donations
I have a form where I enter the Donor information and it has a sub form
where I enter the related donations for that donor.
I have a report for that donor and a sub report for the donor listing their
donations.

First Problem:
In the sub report on the page footer section I have a text box named
[ItemTotal] with this code for the control source: =Sum([ItemValue]) however
when I run that report I do not get a total. Yes, [ItemValue] is the correct
name.

Second Problem:
I'm trying to display the results of the ItemTotal text box, when I can get
it to produce results, on the main donor report. I did this by creating a
text box with this code: =[Reports]![Donated Items SubReport]![ItemTotal] and
again this does not work.

Any thoughts?

Thanks,
Scott
 
If there is no report footer, then find the menu options to display it.

I'm still not quite sure what controls are where (which report and which
section).
--
Duane Hookom
Microsoft Access MVP


Scott said:
There is no report footer???? I opened the report in design mode and there
is a page footer. Access 2007 working on a Access 2003 database.

Tammy F said:
It cannot be in the page footer - put it in the report footer.

Scott said:
I have two tables, Donors, Donations
I have a form where I enter the Donor information and it has a sub form
where I enter the related donations for that donor.
I have a report for that donor and a sub report for the donor listing their
donations.

First Problem:
In the sub report on the page footer section I have a text box named
[ItemTotal] with this code for the control source: =Sum([ItemValue]) however
when I run that report I do not get a total. Yes, [ItemValue] is the correct
name.

Second Problem:
I'm trying to display the results of the ItemTotal text box, when I can get
it to produce results, on the main donor report. I did this by creating a
text box with this code: =[Reports]![Donated Items SubReport]![ItemTotal] and
again this does not work.

Any thoughts?

Thanks,
Scott
 
I don't know if it's the same in Access 2007, but in Access 2003, it's on the
View menu as Report Header/Footer.

If there's already a report header, then there should be a line at the
bottom for report footer. Put your pointer along the bottom edge of it until
it looks like a horizontal line with up and down arrows, then click and drag
until the footer is the size you want it.

--
Amy E. Baggott

"I''m going crazy and I''m taking all of you with me!" -- Linda Grayson


Scott said:
There is no report footer???? I opened the report in design mode and there
is a page footer. Access 2007 working on a Access 2003 database.

Tammy F said:
It cannot be in the page footer - put it in the report footer.

Scott said:
I have two tables, Donors, Donations
I have a form where I enter the Donor information and it has a sub form
where I enter the related donations for that donor.
I have a report for that donor and a sub report for the donor listing their
donations.

First Problem:
In the sub report on the page footer section I have a text box named
[ItemTotal] with this code for the control source: =Sum([ItemValue]) however
when I run that report I do not get a total. Yes, [ItemValue] is the correct
name.

Second Problem:
I'm trying to display the results of the ItemTotal text box, when I can get
it to produce results, on the main donor report. I did this by creating a
text box with this code: =[Reports]![Donated Items SubReport]![ItemTotal] and
again this does not work.

Any thoughts?

Thanks,
Scott
 
Back
Top