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

to synapsevampire(How to choose one of two parameters)

Status
Not open for further replies.

lana123

Programmer
Aug 20, 2003
79
US
To synapsevampire:
Thank you very much for your reply!
Perhaps, I didn't explain well: I need open each record in the report using only ONE of two parameters:ID or NAME (using one exclude using another).
When the users open the report (from Crystal) they would have only one possibility:to send ID and open the report or to send NAME.
Thanks in advance.
L.
 
If you want the potential for multiple parameters in the report, then the user will be prompted for more than one.

You can cheat this by creating a parameter that asks for the type of parameter, and then accepts a value in another parameter, or you might even just use 1 parameter and depending upon what is entered, create the record selection formula accordingly.

In the 1st example:

If {?parm1} = "ID" then
{table.id} = {?parm2}
else
{table.name} = {?parm2}

In the 2nd: //assuming a 1 defines an ID parm

If left({?parm},1) = "1" then
{table.id} = {?parm}
else
{table.name} = {?parm}

-k
 
If you want the potential for multiple parameters in the report, then the user will be prompted for more than one.

You can cheat this by creating one parameter that asks for the type of parameter, and then accepts a value in another parameter, or you might even just use 1 parameter and depending upon what is entered, create the record selection formula accordingly.

In the 1st example:

If {?parm1} = "ID" then
{table.id} = {?parm2}
else
{table.name} = {?parm2}

In the 2nd: //assuming a 1 defines an ID parm

If left({?parm},1) = "1" then
{table.id} = {?parm}
else
{table.name} = {?parm}

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top