I have a crystal report setup and working fairly well.

what i need is to be able to count the specific instances that a specified word appears in teh description.

Is that possible and if so, how would i accomplish it???

I have a attached an image of my report.

Here's an example of what i need.
- Count the specific times the word fixed shows up in the description??? (Totals)

Sample-1.JPG
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Create a formula as follows

if(isnull({table.fieldname}))then
0
else if("FIXED" in uppercase({table.fieldname}))then
1
else
0

Then SUM this formula, rather than counting it.
0
Commented:
do you want the number of times the specified word appears in all descriptions.
or
do you want the number of descriptions the specified word appears in

Are you using a parameter to input the specified word - if not how does it get into the report?
0
Commented:
Try this formula

if "FIXED" in {Description} then 1 else 0

Then do a sum on your formula.
0
Author Commented:
peter57r: - the number of descriptions the specified word appears in
0
Commented:
1. Group1 : Group by Date ( for ecah Month)

2. Group2 : Group by Description

3. Details : place your decription field ( Suppress Detail Section)

4. Group2 Footer : place your counts of your decription on Group2 level

To do this
a) right click on description on detail section > insert summary > count > group2
OR
b)write a formula : Count({Description},{Description})

Thnx
shiv

0
Commented:
If you want to name on nulls:

Instead of Groupin decription, Group on this below formula :

If ISNULL({Description}) Then "No Description"
Else {Description})
0
Author Commented:
thanks for the help;

some of these are working, but they lead me into another problem.

Is it possible to do an If statement and ask to find two words instead of just one???

the following works for me, as to what i said earlier:
IF "Fixed" in {Smart_meter_Installs.RATE_CATEGORY_DESC} then 1 else 0

How would i write it, if i also wanted to search for the word "Res" the same way i am for fixed??

So in the end i would need one formula for counting all the fixed + Res and another for the Fixed - Res

0
Author Commented:
Anyone know how to do a if statement searching for multiple words in a field???
0
Commented:
IF uppercase({Smart_meter_Installs.RATE_CATEGORY_DESC}) LIKE "*FIXED*"

THEN 1

ELSE IF uppercase({Smart_meter_Installs.RATE_CATEGORY_DESC}) LIKE "*RES*"

THEN 1

ELSE 0
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
if statement searching for multiple words in a field :

1. write a formula for Fixed :
@fixed :
IF uppercase({Smart_meter_Installs.RATE_CATEGORY_DESC}) LIKE "*FIXED*"
THEN 1 ELSE 0

2.  write a formula for RS :
@RS
IF uppercase({Smart_meter_Installs.RATE_CATEGORY_DESC}) LIKE "*RES*"
THEN 1 ELSE 0

Sum(@fixed, description) + Sum(@RS, description)

0
Author Commented:
good help, but unable to find exactly what i wanted.

thanks for the help though
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB Reporting Tools

From novice to tech pro — start learning today.