Link to home
Start Free TrialLog in
Avatar of Blue_Dog_Jones
Blue_Dog_Jones

asked on

Select Expert question for Crystal Reports

I have 3 user parameter fields to do various seaches. If the user leaves one of the fileds blank to reduces the results. I think my Select Expert formula is not correct. Here it is, can you rewrite it to allow some of the filed to be blank?

{CONTACT.ST_CD} = {?State search field} and
{CONTACT.CITY_NM} = {?City Search Field} and
{CONTACT.ZONE_USA_PSTL_CD} = {?Zip Code Search Field}
Avatar of Marcus Aurelius
Marcus Aurelius
Flag of United States of America image

Try using CASCADING PARAMETER... so that they will be forced to choose correct fields.

For instance...if they choose TX as the state, then they will ONLY see CITIES in TEXAS as an option. Then when they choose a city...they will ONLY see ZIPs for that city....

Use whichever order or level you need, but use a CASCADING prompt.

MikeV
Are you saying they are only ASKED to input ONE field...?
Avatar of Blue_Dog_Jones
Blue_Dog_Jones

ASKER

I do not know how to do a CASCADING prompt.

I also have a field for street address and SSN# to search by. Not just 3 but 5 user parameter fields they could input. If you want to explain how to do cascading prompts or send me the code i am find with that. Or if you want to modify the code above, I can use that.
Ok..so is this one of those ..."ENTER ALL, SOME OR NONE" prompts...?

I also think that you can set the parameter itself to DEFAULT to something...set it to a WILDCARD character..so that it will pull ALL records when they do NOT input data.

MIkeV
This is a 5 different input boxes. Enter *Some* prompts.
So did you setup DEFAULTS within each prompt?

No I did not set up defaults, I do not know how to do that either.......

I am new and totally blind to CR. Want to show me? with a code sample?
Are you doing this in an application or just using the Crystal prompt?

Here is a link to show how to add ALL to a list of values
http://support.businessobjects.com/library/kbase/articles/c2017514.asp

You can then change your selection to
({CONTACT.ST_CD} = {?State search field} OR {?State search field} = 'ALL')
and
({CONTACT.CITY_NM} = {?City Search Field} OR {?City Search Field} = 'ALL')
and
({CONTACT.ZONE_USA_PSTL_CD} = {?Zip Code Search Field} OR {?Zip Code Search Field} = 'ALL')

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of crgary_tx
crgary_tx
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial