SAP Knowledge Base Article - Public

1618289 - How to calculate count of repeating letter in a word

Symptom

How to calculate count of repeating letter in the word

Environment

Crystal Reports 2008

Resolution

Use the below formula to find the count of repeating letter in a word

local numberVar count:= 0;
local stringVar name := "Crystal Designer";
Local numberVar strLen:=length(name);
local numberVar I;
for i:=1 to strLen do
    If Mid(name,i,1)= "r"
        then count := count +1;
count

Keywords

count of Repeating letter in a word, Repeating letter , KBA , BI-RA-CR-DSL , Crystal Reports on Data Semantic Layer , How To

Product

SAP Crystal Reports all versions