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  

Summing from a Subreport



 
 
Thread Tools Display Modes
  #1  
Old July 16th, 2004, 10:23 PM
el zorro
external usenet poster
 
Posts: n/a
Default Summing from a Subreport

My report lists customer records, some of which submit a
varying number of payments of diferent types. My report
shows the record for each customer, and uses a subreport
to list the individual payments. The subreport also sums
the payments for each customer.

I want to group the customers by Region, and show the
total customer payments for each Region. So I set up a
group footer for Region, and stuck in a Sum functiion:
=Sum([Payment Totals]). THis doesn't seem to be working.
Payment Totals is itself a sum from a subreport... if
that has anything to do woth it. Any thoughts?
  #2  
Old July 17th, 2004, 12:58 AM
Marshall Barton
external usenet poster
 
Posts: n/a
Default Summing from a Subreport

el zorro wrote:

My report lists customer records, some of which submit a
varying number of payments of diferent types. My report
shows the record for each customer, and uses a subreport
to list the individual payments. The subreport also sums
the payments for each customer.

I want to group the customers by Region, and show the
total customer payments for each Region. So I set up a
group footer for Region, and stuck in a Sum functiion:
=Sum([Payment Totals]). THis doesn't seem to be working.
Payment Totals is itself a sum from a subreport... if
that has anything to do woth it. Any thoughts?



Add a text box named txtRegionRunTotal in the same section
as the subreport. Set its expression to something like:

=IIf(subreport.Report.HasData, subreport.Report.total, 0)

Also set the text box's RunningSum property to Over Group.

Now the region footer's total text box can use the
expression:

=txtRegionRunTotal
--
Marsh
MVP [MS Access]
  #3  
Old July 19th, 2004, 11:08 PM
external usenet poster
 
Posts: n/a
Default Summing from a Subreport

THanks for your response. Can you tell me a little more
about the ".HasData" part? I don't think I'm using the
right syntax or something (I cant get the IIf statement
to work).

-----Original Message-----
el zorro wrote:

My report lists customer records, some of which submit

a
varying number of payments of diferent types. My report
shows the record for each customer, and uses a

subreport
to list the individual payments. The subreport also

sums
the payments for each customer.

I want to group the customers by Region, and show the
total customer payments for each Region. So I set up a
group footer for Region, and stuck in a Sum functiion:
=Sum([Payment Totals]). THis doesn't seem to be

working.
Payment Totals is itself a sum from a subreport... if
that has anything to do woth it. Any thoughts?



Add a text box named txtRegionRunTotal in the same

section
as the subreport. Set its expression to something like:

=IIf(subreport.Report.HasData,

subreport.Report.total, 0)

Also set the text box's RunningSum property to Over

Group.

Now the region footer's total text box can use the
expression:

=txtRegionRunTotal
--
Marsh
MVP [MS Access]
.

  #4  
Old July 20th, 2004, 01:28 AM
Marshall Barton
external usenet poster
 
Posts: n/a
Default Summing from a Subreport

=IIf(subreport.Report.HasData, subreport.Report.total, 0)

whe
"subreport" is the name of the subreport ***control*** on
the main report. Note that this may be differrent from the
name of the report object it is displaying.

"total" is the name of the text box in the subreport's
footer with the calculated total.

The HasData property will be True if the subreport has at
least one data record, it will be False if the subreport's
dataset is empty.
--
Marsh
MVP [MS Access]



wrote:

THanks for your response. Can you tell me a little more
about the ".HasData" part? I don't think I'm using the
right syntax or something (I cant get the IIf statement
to work).

-----Original Message-----
el zorro wrote:

My report lists customer records, some of which submit

a
varying number of payments of diferent types. My report
shows the record for each customer, and uses a

subreport
to list the individual payments. The subreport also

sums
the payments for each customer.

I want to group the customers by Region, and show the
total customer payments for each Region. So I set up a
group footer for Region, and stuck in a Sum functiion:
=Sum([Payment Totals]). THis doesn't seem to be

working.
Payment Totals is itself a sum from a subreport... if
that has anything to do woth it. Any thoughts?



Add a text box named txtRegionRunTotal in the same

section
as the subreport. Set its expression to something like:

=IIf(subreport.Report.HasData,

subreport.Report.total, 0)

Also set the text box's RunningSum property to Over

Group.

Now the region footer's total text box can use the
expression:

=txtRegionRunTotal
--
Marsh
MVP [MS Access]
.


 




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
Subreport not working right Pele Setting Up & Running Reports 6 July 13th, 2004 01:40 PM
Determining the Position of a Subreport clane Setting Up & Running Reports 1 July 2nd, 2004 04:54 PM
Problems totalling subreport data on main report (A-2002) Marshall Barton Setting Up & Running Reports 0 June 23rd, 2004 08:01 PM
Group in subreport Sunny Setting Up & Running Reports 3 May 26th, 2004 01:52 PM
Pass a filter from report to subreport Fons Ponsioen Setting Up & Running Reports 0 May 18th, 2004 02:30 PM


All times are GMT +1. The time now is 08:32 PM.


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