MikeCopeland
Programmer
Using CR XI...
In a report I'm developing I need to count the # of Male clients and the # of Female clients - for grouping _and_ a grand total at the end of the report. I had to do the following for both "M" & "F" gender codes:
// @numMales - returns 1 for "M"; 0 otherwise
WhileReadingRecords;
if({Clients.Sex} = "M") then 1
else 0
...and a similar formula for Females ("F"). I then do a Running Total Sum on @numMales & @numFemales, resetting on my Group field. This works fine.
Then I tried to set up a Running Total Sum with the same 2 formulas, but Resetting Never. These values don't (quite) work: they're a little too large - nothing obvious, just not quite right. What might I be doing wrong here? TIA
In a report I'm developing I need to count the # of Male clients and the # of Female clients - for grouping _and_ a grand total at the end of the report. I had to do the following for both "M" & "F" gender codes:
// @numMales - returns 1 for "M"; 0 otherwise
WhileReadingRecords;
if({Clients.Sex} = "M") then 1
else 0
...and a similar formula for Females ("F"). I then do a Running Total Sum on @numMales & @numFemales, resetting on my Group field. This works fine.
Then I tried to set up a Running Total Sum with the same 2 formulas, but Resetting Never. These values don't (quite) work: they're a little too large - nothing obvious, just not quite right. What might I be doing wrong here? TIA