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!

Parameter Field

Status
Not open for further replies.

aramraj

Programmer
Nov 16, 2004
4
CA
I have a parameter field. When I enter a value in the parameter field it should return the corresponding record from the database.

If the parameter field is empty (nothing is entered) it should return all the records.

How should I do it?

Any help is appreciated.
 
First, in the parameter screen, go to set default values and enter "All" with no quotes as one of the parameter options. Use the toggle key to make this the topmost selection in the list to the right. Then go to edit selection formula->record and enter:

if {?parm} <> "All" then
{table.field} = {?parm} else
if {?parm} = "All" then true

If a user makes no selection, the default "All" will result in all records being returned.

-LB
 
Thanks for the response.

But it is not working. Any work around?
 
This is a standard record selection formula that should work, so we need to know more about what you are doing. First, please post the actual formula you used. Also explain what records were returned when you entered no parameter, and whether the correct records wer returned when you chose one or more other parameter options.

-LB
 
What is not working? Post what you tried, not that something you did doesn't work...

LB is spot on, so something YOU'VE done isn't working.

Also your post describes nothing technical, post meaningful information if your intent is to be provided with a quick, accurate response:

Crystal version
Database/connectivity used
Example data
Expected output

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top