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

cascading parameters in C.R. XI

Status
Not open for further replies.

miscluce

MIS
Oct 4, 2007
149
US
I am doing a report that asks the user for 5 paramter values. (start date, end date, Type, subtype2, subtype3). Butit forces the user to select all paramter values. I also want to allow the user to be able to select just type. or type with subtype2 and without the subtype3 paramter but it wont work like that its forcing the user to select all parameters. does any body know how to fix this? I am using the dynamic paramter values?
 
The way i know is by giving the Parameter a default value.

Then in the selection criteria :

if {param1}="Default" then {Field1} like "*" else {Field1}={Param}

 
can you calrify that code a little better. what about param 2 or param3
 
Have all the parameters with Default Value.
Let's say your default value is "ALL"

if{?Param1}<>"ALL" then {Field1}={?Param1} else true

This way it won't force the user to select all the parameters ,By default it picks all the values of the parameter.

Write the code for all the parameters in the same way.

Hope i'm clear.
 
thanks. its just un clear on where to put this. do i do this in the selection expert under the formula selction?

if so, this is what i did:

if {?Type - WOTYPE2}="Default" then {TASKS.WOTYPE2} like "*" else {TASKS.WOTYPE2} = {?Type - WOTYPE2}

it still forces the user to make a selection on the last paramter
 
I'm assuming that these are static parameters or dynamic.

Is sub,subtype1,subtype2-Cascading.
If that's the case ,i can't help ,the only way is use the shift key to select everything,if that's waht you want to happen if the user doesn't select anthing.


If not cascade:
You place the code in Selection Expert-Record Selection.
You have to add "ALL" as default value in the parameter Value options.

(if{?Param1}<>"ALL" then {Field1}={?Param1} else true)and
(if{?Param2}<>"ALL" then {Field1}={?Param2} else true) and
(if{?Param3}<>"ALL" then {Field1}={?Param3} else true)

just the way you do with the parameters.

Hope this clears .

 
yeah, its cascading. thanks anyway. I decided just to do 3 different reports which will suffice.

But now i see. this will work if the parameters are static.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top