?
Solved

Advanced Sorts??

Posted on 2010-04-07
11
Medium Priority
?
391 Views
Last Modified: 2013-11-15
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)

let me know if you need anymore information

thanks in advance
Sample-1.JPG
0
Comment
Question by:UKSystemSupport
11 Comments
 
LVL 13

Expert Comment

by:PCIIain
ID: 30033029
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
 
LVL 77

Expert Comment

by:peter57r
ID: 30033238
Just to be precise about this..
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
 
LVL 1

Expert Comment

by:BSAS_ITGuy
ID: 30033466
Try this formula            

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

Then do a sum on your formula.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 

Author Comment

by:UKSystemSupport
ID: 30036544
peter57r: - the number of descriptions the specified word appears in
0
 
LVL 9

Expert Comment

by:shivkasi
ID: 30037838
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
     and your {group2 Name}

 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
 
LVL 9

Expert Comment

by:shivkasi
ID: 30038028
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 Comment

by:UKSystemSupport
ID: 30039288
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 Comment

by:UKSystemSupport
ID: 30044349
Anyone know how to do a if statement searching for multiple words in a field???
0
 
LVL 9

Accepted Solution

by:
shivkasi earned 1000 total points
ID: 30051471
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
 
LVL 9

Expert Comment

by:shivkasi
ID: 30051814
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

3. adding both :
Sum(@fixed, description) + Sum(@RS, description)



0
 

Author Closing Comment

by:UKSystemSupport
ID: 31711888
good help, but unable to find exactly what i wanted.

thanks for the help though
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question