[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Select Expert question for Crystal Reports

Posted on 2007-10-12
9
Medium Priority
?
1,646 Views
Last Modified: 2011-04-12
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}
0
Comment
Question by:Blue_Dog_Jones
9 Comments
 
LVL 17

Expert Comment

by:MIKE
ID: 20065622
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
0
 
LVL 17

Expert Comment

by:MIKE
ID: 20065630
Are you saying they are only ASKED to input ONE field...?
0
 

Author Comment

by:Blue_Dog_Jones
ID: 20065692
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.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 17

Expert Comment

by:MIKE
ID: 20065728
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
0
 

Author Comment

by:Blue_Dog_Jones
ID: 20065744
This is a 5 different input boxes. Enter *Some* prompts.
0
 
LVL 17

Expert Comment

by:MIKE
ID: 20065784
So did you setup DEFAULTS within each prompt?

0
 

Author Comment

by:Blue_Dog_Jones
ID: 20065825
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?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 20065936
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
0
 
LVL 13

Accepted Solution

by:
crgary_tx earned 200 total points
ID: 20066158
(
if {?State search field}  = '' or isnull({?State search field} ) then
true
else
{CONTACT.ST_CD} = {?State search field}
)
and
(
if  {?City Search Field} = '' or isnull( {?City Search Field}) then
true
else
{CONTACT.CITY_NM} = {?City Search Field}
)
and
(
if {?Zip Code Search Field}= '' or isnull({?Zip Code Search Field}) then
true
else
{CONTACT.ZONE_USA_PSTL_CD} = {?Zip Code Search Field}
)

Gary
0

Featured Post

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.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Loops Section Overview
Suggested Courses
Course of the Month19 days, 6 hours left to enroll

834 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