Joined: 22 May 2009
Online Status: Offline
Posts: 347
Posted: 29 Jun 2011 at 4:47am
Use the three-formula running total technique.
First Formula: Initialize Formula: whileprintingrecords; global numbervar nMaleCount:=0; global numbervar nFemaleCount:=0;
Second Formula: Calculation Formula: whileprintingrecords; global numbervar nMaleCount:= nMaleCount + (if {table.sexfield}='M' then 1 else 0); global numbervar nFemaleCount:=nFemaleCount + (if {table.sexfield}='F' then 1 else 0);
Third Formula: Display Formula (Male): whileprintingrecords; 'Male: ' & global numbervar nMaleCount
Fourth Formula: Display Formula (Female): whileprintingrecords; 'Female: ' & global numbervar nFemaleCount
Place the Initialize Formula on a page header, the Calculate Formula on the detail line that has the {table.sex} field, and the Display Formulas in your page footer.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum