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

Parameter Selection Formula Problem

Status
Not open for further replies.

rcbatlinux

Technical User
Mar 30, 2001
80
0
0
US
I have about 5 parameters. Each one has a DEFAULT setting with the verbiage of "All". I tried creating IF statements in the Selection formula but I would have a mamoth amount of embedded statements. So I thought that I would create a formula for each parameter such as:

IF prtField = "All" then ??? ELSE prtField

Then in my selection record:

fieldname = frmField (formula field above)

But how do I tell it that I want ALL records? Thus my ??? up there. There some value I can assign to prtField that will mean All records? I tried a wild card such as * but didn't work. Any suggest would be great!

rcbatlinux
 
I have a FAQ in the Formulas forum which addresses this.

One of the key factors is getting the SQL to pass to the database, which your approach might not do.

Here's an example of how to set this up so that it will get the dewsired results, and pass the SQL to the database, providing optimal performance:

(
If {?prtField1} <> &quot;All&quot; then
{table.field} = {?prtField1}
else If {?prtField1} = &quot;All&quot; then
true
)
and
(
If {?prtField2} <> &quot;All&quot; then
{table.field} = {?prtField2}
else If {?prtField2} = &quot;All&quot; then
true
)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top