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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |