Create a formula such as to count all of them (or separate formulas if you're going to just display the values):
whileprintingrecords;
global numbervar Ns:=0;
global numbervar Xs:=0;
global numbervar Ys:=0;
global numbervar SomethingElse:=0;
numbervar X; // used as the counter
for x := 1 to length({AtsAddrs.chvAddr1}) do(
if mid({AtsAddrs.chvAddr1},X) = "N" then
Ns:=Ns+1
else
if mid({AtsAddrs.chvAddr1},X) = "X" then
Xs:=Xs+1
else
if mid({AtsAddrs.chvAddr1},X) = "Y" then
Ys:=Ys+1
else
SomethingElse := SomethingElse+1
);
Now you can us the results in other formulas, such as:
whileprintingrecords;
global numbervar Ns;
If Ns > 0 then
"I found " + totext(Ns,0) + " of the value N"
else
"There are no N's"
-k
kai@informeddatadecisions.com