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

Formula for using wild card input in the parameter 3

Status
Not open for further replies.

TomiCobi

Technical User
Sep 29, 2010
5
CA
I am asked to run a report that will show changes in member's category (previous to current). The objective is for user of the report to be able to enter even a wild character in the parameter set. I have the previous and current category as parameters. Below is what I have in my Select Expert:

@toDate} = {?Date} and
{Gen_Tables.TABLE_NAME} = "CATEGORY" and
{Activity.ACTIVITY_TYPE} = "STATUS_CHG" and
{Activity.PRODUCT_CODE} = "Name.CATEGORY" and
{Activity.UF_2} = {?New Category} and
{Activity.UF_1} = {?Previous Category} and
{Name.STATUS} = "A"

I could give more info if needed to clarify further the requirements. I would be glad to get any assistance as I am new in Crystal. We are using CR9 by the way.

Thanks,
TomiCobi

 
One thing to remember you can use the 'like' operator for wildcards. If the user enters a '*', it should return all the values for that selection.
 
It not clear by what you mean to use a wild character.

If you want to show say all New categories or All Previous categories.

Add a default value of "All" to each parameter and then change selection to

(If {?New Category} <> "All" then {Activity.UF_2} = {?New Category} else true) and
(If {?Previous Category} <> "All" then {Activity.UF_1} = {?Previous Category} else true) and

Ian
 
@toDate} = {?Date} and
{Gen_Tables.TABLE_NAME} = "CATEGORY" and
{Activity.ACTIVITY_TYPE} = "STATUS_CHG" and
{Activity.PRODUCT_CODE} = "Name.CATEGORY" and
{Activity.UF_2} like "*"+{?New Category}+"*" and
{Activity.UF_1} like "*"+{?Previous Category}+"*" and
{Name.STATUS} = "A"

-LB

 
Thank you all (kray, Ian and lbass) for your quick solutions. I do appreciate it. I tried all your suggestions and all worked just perfect. Thank you once more for the learning lessons.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top