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

can i do 'ALL' for parameter in command

Status
Not open for further replies.

ss7415

Programmer
Dec 7, 2006
84
US
im using crystal xi and oracle xi

this is my in my command
QTY.PART ='{?PART}'AND QTY.LOT_NBR = '{?LOT}'

instead of doing it im my record selection can i do it in my command?


(if {?LOT #} <> 'ALL' then
{Command.LOT_NBR} = {?LOT #}
else
if {?LOT #} ='ALL' then true) and
(if {?PART #} <> 'ALL' then
{Command.PART} = {?PART #}
else
if {?PART #} = 'ALL' then
true)
 
You have to put quotes around your parameter in this also. I would set it up like this:

(
(
'{?LOT #}' <> 'ALL' and
QTY.LOT_NBR = '{?LOT #}'
) or
'{?LOT #}' = 'ALL'
) and
(
'{?PART #}' <> 'ALL' and
QTY.PART = '{?PART #}'
) or
'{?PART #}' = 'ALL'
)

Not sure what your punctuation looks like in the command for your fields (QTY.LOT_NBR, and QTY.PART), so you would have to adjust that.

Then in the main report go into the parameter editing screen and add your part/lot numbers and "ALL" as a selection option in each parameter.

If you are using a command as your datasource, you should try to set up the entire report using the command, adding parameters and selection criteria within the command, and not also use record selection criteria in the report proper.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top