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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to filter on keyword search in Crystal Reports 10.0 1

Status
Not open for further replies.

carolin8282

IS-IT--Management
Joined
Jan 23, 2007
Messages
7
Location
US
I need help! I am using an existing report and I want to filter on a keyword that can be found in the "brief description" field. I played with many formulas with NO LUCK. I have Crystal Reports 10.0. If you can offer ANY suggestions, please do!!!
 
First set up a parameter for the keyword {?keyword} and then set up your record selection formula like:

{table.briefdesc} like "*"+{?keyword}+"*"

-LB
 
lbass, thank you for this suggestion. I tried doing this, but it doesn't seem to be picking anything up - I always get a report with no results (and I know there should be - the keyword shows up plenty times before I insert the parameter). The brief description is a string and I just want to find all the descriptions that contain the word "citrix" in them - please help!!!
 
Please show the exact formula you used. You also might be running into case sensitivity. You could create a SQL expression {%desc} like this:

{fn ucase(`table`.`briefdesc`)}

Or just:

ucase(`table`.`briefdesc`)

The punctuation/syntax depends upon your datasource/connectivity.

Then set up the selection formula like this:

{%desc} like "*"+ucase({?keyword})+"*"

If you're not using a parameter, you could use:

{%desc} like "*CITRIX*"

-LB
 
I created the parameter "@keyword" and set it as a discrete value. I then used the Select Expert like this: (`table`.`briefdesc`) then selected "is like" from dropdown and selected the "@keyword". Here's the exact formula:

{uspPeregrineBCN_IT_DetailReport;1.BRIEF_DESCRIPTION} like {?@keyword}

Nothing is coming up with this formula!!!
 
I also tried the ucase and it didn't work :(
 
omG, please disregard the last post - the ucase did it!!!!!!!!! THANK YOU SO MUCH!!!!!!!!! YOU HAVE NO IDEA HOW HAPPY I AM :)
 
OK, I'm back! It's pulling in doubles for some reason. Any ideas for why this might happen? This is my code:

{uspPeregrineBCN_IT_DetailReport;1.PROBLEM_TYPE} in ["Break-Fix"] and
{uspPeregrineBCN_IT_DetailReport;1.BRIEF_DESCRIPTION} like "*"+ucase({?@keyword})+"*
 
Depends upon what you mean by "doubles". If every field is duplicated, go to database->check "select distinct". Otherwise please show a sample of your data and then also show what you would like to see instead. What you are seeing is not because of the keyword selection, but instead probably because of table joins.

-LB
 
I figured this out as well - I added a flag indicator in the select expert and it wasn't occurring anymore! Thanks for all your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top