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!

Trouble calculating totals with formula fields

Status
Not open for further replies.

crysma

Programmer
Oct 17, 2002
21
CA
Hi,

Let me start with what I'm trying to do. I'm pulling most of my information from a user information table containing, among other things, the users age group, location and sex. I've got my report grouped first by location and then by age group.

What I'd like to be able to do is calculate the total number of males and females in each age group in each location. Unfortunately this is givinc me quite a bit of trouble. Here is the code that I have right now, just to calculate the number of males:

Dim Male as Number
While {User.GENDER}<>&quot;&quot;
If {Mortality.GENDER}=&quot;M&quot; Then
Male=Male+1
End If
Wend
Formula = Male

This is throwing me an &quot;A loop was evaluated more than the maximum number of times allowed&quot; error. What am I missing or doing wrong here? I've only been workin with crystal reports for a couple of days here, so I'd really appreciate any tips or pointers.

Thanks in advance,

Sheryll
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top