Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Subreport Total to Main Report

Status
Not open for further replies.

monika102001

Programmer
Sep 25, 2005
26
US
Please Help Me,

What am I doing wrong?? I need have total value from subreport and put to Main Report in Report Footer. I have:
Subreport Name: CRTS_BusinessC_OwnChSubreport
In Report Footer is text box that has total i needed for Main Report in Report Footer: Name:Total_Sub (has Running Sum:OverAll)

In Main Report I made a text box in Report Footer with Running Sum:OverAll:
Name:Total_Report
Control Source:=CRTS_BusinessC_OwnChSubreport.Report!Total_Sub

 
yes, In subreport, I have two records and I made the text box that calculates visible = true so I see it's counting and the text box from report footer shows number 2 as it should
 
Also when I run main report I see the numbers correct, but I do not see that number in report footer in main report.
it must be something how I refer that text box in main report in report footer
 
monika
Try this...

In the main report, put the reference to the subreport in the Page Footer rather than in the Report Footer.

Tom
 
Tom,
Would this work if I put the text box in the vb code in main report;
Total_Report.value = CRTS_BusinessC_OwnChSubreport.Report!Total_Sub

Total_Report.Visible = True

p.s I will try to do now
 
monika
I think the problems are these...

1. There won't be anything ever in the main Report Footer until the very end of the report.
2. Access is having trouble determining what to put in that main Report Footer.

Are you wanting to show something for each record? Or only at the very end of the report?

Tom

 
It has to be like that in Main Report:

Subreport1: Company name Comments
Company name comments
Subreport2: Company name Comments

etc....

Subreport1 : Total Value
Subreport2: Total Value
etc....
 
I guess I will do queries and then do DLookUp for each Totals
 
monika
If you want to show something for each record, then you should put it in the Page Footer. But then you have to refer to the name of the text box that refers to the value from the subreport footer

In other words...you need the name of the text box that has the control source
=[CRTS_BusinessC_OwnChSubreport].[Report]![Total_Sub]

Example...If it is named Text12, then in the Page Footer put a new text box that has the control source as
=Text12

-----
If you want to show something only at the end of the report, do this...
1. Leave the [Total_Sub] in the report
2. Put another text box (just for example, let's call it Text13). Make the control source for it whatever the name of the text box is that has the control source
=[CRTS_BusinessC_OwnChSubreport].[Report]![Total_Sub]
3. In the Report Footer, put a new text box that has its control source as
=Text13
and make it a running sum over all.

Tom

 
monika
What you are trying to do should work. It's just a matter of referring to the various text boxes in the proper manner.

It's almost 2 a.m. here so I am cutting off for tonight. But post back with a solution, and I will look here again in the morning.

Good luck with your project.

Tom
 
I lost you,
I'm trying to do second part, where you want me to put Text13?
 
O! i know what you were trying to do. I did try but I'm getting to tired I will try tomorrow.

Thanks again!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top