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

Using group totals on report end 1

Status
Not open for further replies.

dougnc

Programmer
Sep 2, 2001
62
US
I have a field marked yes/no. I need a report where all the yes's list first, with a total, then all the no's.

At the end I want to make a percentage out of the yes's and no's by dividing count of the yes's by the count of the no's.

I've been trying to embed queries in the totals field, no luck.

Any ideas?
 
Select your Yes/No field in the Sorting and Grouping options and sort accordingly to get them all together. Then to count them use these expressions in the control source for your textboxes.

=Sum(IIf([FieldName] = "Yes",1,0))
=Sum(IIf([FieldName] = "No",1,0))

Then to get the percent use
=Sum(IIf([FieldName] = "Yes",1,0))/=Sum(IIf([FieldName] = "No",1,0))

That should get you close.

Paul

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top