Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Occurances

Status
Not open for further replies.

Smithsc

MIS
Joined
Apr 20, 2007
Messages
143
Location
GB
I'm using crystal reports XI and I'm trying to count the number of time a word appears in a memo field record. Is this possible?

For example: I've got a memo field which contains
Incomplete:06/05/2010 15:17:00<BR>Corrected:07/05/2010 08:58:00<BR>Incomplete:07/05/2010 12:05:00<BR>Corrected:10/05/2010 09:10:00<BR>

and I need to count the number of times Incomplete appears.

Thanks
 
Use formula

@Incomplete
count(split({Memofield}, 'Incomplete'))

Ian

 
Should be

@Incomplete
count(split({Memofield}, 'Incomplete'))-1

As this will return 1 when 'Incomplete' is not found
 
Thanks Ian.
Such a simple answer when you know the correct formula.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top