You just have to loop through it and use a counter to keep track of the number of "Y"s.
Here is a sample code, but I'm just typing it in off the top of my head and you will probably have to correct a couple syntax errors.
For ThisChar := 1 to Len({database.weeks}) DO
(
If Mid(database.weeks}, ThisChar, 1) = "Y" Then
NumberYs := NumberYs + 1;
)
NumberYs;
My Encyclopedia book has three chapters dedicated to teaching you Crystal syntax and how to create formulas with it. You can find out more about my books at
Amazon.com or reading the
Crystal Reports eBooks online.
Edited by BrianBischof - 08 Oct 2008 at 10:17am