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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Totals not totalling in sub-report

Status
Not open for further replies.

JSMITH242B

Programmer
Mar 7, 2003
352
GB
Hi Group,
I have a Main Report and a sub-report.
I need summaries by Branch by certain fields ie count of Males, Count of Females etc

I have noticed a couple of oddities in trying to get this to work. I thought maybe if I pointed out the oddities, someone will be able to spot where I am going wrong.

If I do not insert a Branch Group in the Main report, I cannot see the sub-report. Is this normal?

After creating a Branch Group in the Main report, I placed the sub-report in the group footer for the Branch group. I subesquently created running totals for the summary fields and placed them in the sub-reports Branch group footer. Also tried placing them in the sub-reports report footer.
I do not get the correct values.

When I copy and paste these running totals from the sub-report into the Main Reports Branch group Footer i.e on top of the sub-report outline, the summaries are correct.
This is not OK however as I get a summary after each Branch change. I just need a summary at the bottom of the report.

What am I doing wrong. This is baffling.

TIA
Jackie
 
"If I do not insert a Branch Group in the Main report, I cannot see the sub-report. Is this normal?"

No, a subreport has nothing to do with any groups.

If the main report has no data, then you may not ge a subreport, is that what you mean?

Your requirement described does not require a subreport.

Create 2 formulas to count males and females, as in:

@Male
iif({table.gender} = "M",1,0)

@Female
iif({table.gender} = "M",1,0)

Now you can sum on these fields to get counts.

Place them in the details, right click and select insert summary->Sum

Then you can delete them from the details.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top