A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to get SubReport Total to show on Main Report?



 
 
Thread Tools Display Modes
  #1  
Old June 24th, 2004, 05:28 PM
MikeB
external usenet poster
 
Posts: n/a
Default How to get SubReport Total to show on Main Report?

I have not been able to figure this out. I have a main report with a
sub-report in it.
The sub-report has a field called Text84, that is the Sum of a field called
"dctrip-dollars", looks like this to get the total on the Sub-Report,
=Sum([dctrip-dollars]).

I want to be able to move the Text84 total to the maim report where I do
other calculations. I tried to get the total with this statement,

=([Reports]![STrptStatement20022003]![Text84])

Does not work. Give me an Error message.

Any ideas on what I have done wrong, and how to fix it.

Thanks for the help,
MikeB



  #2  
Old June 24th, 2004, 05:46 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default How to get SubReport Total to show on Main Report?

Subreports are not open in their own right, i.e. they are not part of the
Reports collection.

Try:
=[STrptStatement20022003].[Report]![Text84])
where "STrptStatement20022003" is name of the subreport *control* on your
main report.

If the subreport has no data, that reference will give you an error, which
will mess up your calculations. Once you get the above working, test the
HasData property of report in the subreport control, and also use Nz() to
convert any null to zero:

=IIf([STrptStatement20022003].[Report].HasData,
Nz([STrptStatement20022003].[Report]!Text84,0), 0)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MikeB" wrote in message
hlink.net...
I have not been able to figure this out. I have a main report with a
sub-report in it.
The sub-report has a field called Text84, that is the Sum of a field

called
"dctrip-dollars", looks like this to get the total on the Sub-Report,
=Sum([dctrip-dollars]).

I want to be able to move the Text84 total to the maim report where I do
other calculations. I tried to get the total with this statement,

=([Reports]![STrptStatement20022003]![Text84])

Does not work. Give me an Error message.

Any ideas on what I have done wrong, and how to fix it.

Thanks for the help,
MikeB



  #3  
Old June 24th, 2004, 07:30 PM
MikeB
external usenet poster
 
Posts: n/a
Default How to get SubReport Total to show on Main Report?

Allen,

Thanks very much, this worked great. The Access NewsGroups and all who
monitor have been so very helpful to me, I can't thank you enough. I have a
number of books on Access in various versions, and when I can't find the
answer there, the News Groups always come through. I have learned a lot
just by watching others postings.

Again, thanks very much.

MikeB

~~~~~~~~~~~~~~~~~~~~~~~~~



"Allen Browne" wrote in message
...
Subreports are not open in their own right, i.e. they are not part of the
Reports collection.

Try:
=[STrptStatement20022003].[Report]![Text84])
where "STrptStatement20022003" is name of the subreport *control* on your
main report.

If the subreport has no data, that reference will give you an error, which
will mess up your calculations. Once you get the above working, test the
HasData property of report in the subreport control, and also use Nz() to
convert any null to zero:

=IIf([STrptStatement20022003].[Report].HasData,
Nz([STrptStatement20022003].[Report]!Text84,0), 0)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MikeB" wrote in message
hlink.net...
I have not been able to figure this out. I have a main report with a
sub-report in it.
The sub-report has a field called Text84, that is the Sum of a field

called
"dctrip-dollars", looks like this to get the total on the Sub-Report,
=Sum([dctrip-dollars]).

I want to be able to move the Text84 total to the maim report where I do
other calculations. I tried to get the total with this statement,

=([Reports]![STrptStatement20022003]![Text84])

Does not work. Give me an Error message.

Any ideas on what I have done wrong, and how to fix it.

Thanks for the help,
MikeB





  #4  
Old June 25th, 2004, 02:22 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default How to get SubReport Total to show on Main Report?

Excellent, Mike. Appreciated.

Most of us would echo your sentiments. What we have learned here from
everyone's real-world struggles and solutions is invaluable.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MikeB" wrote in message
link.net...
Allen,

Thanks very much, this worked great. The Access NewsGroups and all who
monitor have been so very helpful to me, I can't thank you enough. I have

a
number of books on Access in various versions, and when I can't find the
answer there, the News Groups always come through. I have learned a lot
just by watching others postings.

Again, thanks very much.

MikeB



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Label SRIT General Discussion 2 June 22nd, 2004 09:42 PM
need help make a report [email protected] General Discussion 2 June 16th, 2004 08:31 PM
Using a calculated subtotal field in main report in access97 jberv534 Setting Up & Running Reports 4 June 1st, 2004 03:05 PM
Please help with report format Al Setting Up & Running Reports 0 June 1st, 2004 02:46 PM
show only the negative total jv Worksheet Functions 4 January 20th, 2004 06:21 PM


All times are GMT +1. The time now is 12:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.