subreport not calculating total sum

genevx

Registered User.
Local time
Today, 13:58
Joined
Jul 3, 2002
Messages
36
Hi,
I've created a report for amount totals grouped by exchange type according to a date range entered by the user. Within this report, I've created a subreport which reports the amounts for each exchange type for today. However, I cannot get a total sum for the subreport because it takes each individual record of exchange type reported as ONE report. Therefore, the percentages come out as 100% for each exchange type because the sums are only the amounts for each exchange type. They don't seem to be linked together as one report, no matter where on the report i put the sum. Please help this newbie! =P and thanks!

genevx
 
if the above was a little confusing...let's just put it this way...how do you calculate a grand total from a subreport and then send it out to the main report??? I know this has GOT TO be simple...i'm just too stupid and tired to find out =P
 
Do this in the control source of a text box on your main form:

=[Reports]![SubReportName].[Total]
I hope that helps:D
 
Add a textbox to the subreport footer, set its control source to =Sum([YourField])
Reference that field as Sohaila suggested, however you should use the HasData method if your sub is likely to contain no records at some stage
 
cool...but how do you use the hasData method? don't seem to understand the syntax...=P and also...for some reason when i calculate percentage for the commission on the subreport: Sum([Com]) / [SumAll], it takes the SumAll from the main report rather than the subreport. I'm so confused...=P
 
Last edited:
i just don't seem to understand why when I put Sum(Com) in the report footer of my subreport, it doesn't give me the total of all the amounts, but rather just returns me the value of each individual amount. =( please help! this just seems like such a simple thing access should be able to do.
 

Users who are viewing this thread

Back
Top Bottom