RE: Disable parameter based on another parameter
RE: Disable parameter based on another parameter
(OP)
Hello,
I'm not sure if this is possible but I have a parameter that you can either select "Anes" or "Sur". What I would like to do is that if "Anes" is selected then show the Parameter {?Anes} and if "Sur" is selected then show {?sur}. I would need to do this within Crystal as a formula etc.
Thanks Much!
I'm not sure if this is possible but I have a parameter that you can either select "Anes" or "Sur". What I would like to do is that if "Anes" is selected then show the Parameter {?Anes} and if "Sur" is selected then show {?sur}. I would need to do this within Crystal as a formula etc.
Thanks Much!
RE: RE: Disable parameter based on another parameter
(
(
{?Which}="Anes" and
{table.anes}={?Anes}
) or
(
{?Which}="Sur" and
{table.sur}={?Sur}
)
)
Only the values for the selected parameter would affect the report results, but you would still need to make a selection for all three parameters, so you might want to add a selection "All" for each (or 0 for a number, with "All" as a description field), so that the selections make sense to the user. More recent versions of Crystal have "optional" parameters, so you might want to look at that functionality.
-LB
RE: RE: Disable parameter based on another parameter
Thanks for the quick response! This works but I would like to take this 1 step further. Using your suggestion I'm getting 2 parameters in the panel. One for {?Sur} and one for {?Anes}. What I would like to do is have only 1 parameter within the panel so if
{?Which}="Sur" the only show {?Sur} in the panel or if {?Which}="Anes" then only show {?Anes}. Is this possible?
Cathy
RE: RE: Disable parameter based on another parameter
I figured it out. I needed to add a calculated field to my query so If it field name like Anes then "Anes" else "Sur".
I then created a cascading parameter that if you select "Anes" then it shows the records for "Anes" else it show the records for "Sur".
Thanks for your help!
RE: RE: Disable parameter based on another parameter
(
(
{?Which}="Anes" and
{table.anes}={?SurOrAnes}
) or
(
{?Which}="Sur" and
{table.sur}={?SurOrAnes}
)
)
Another option is to write the command so that only one set of values is returned by adding the Which parameter into the where clause within each side of the union command. Then you would set up the {?SurOrAnes} parameter as a dynamic one based on the field in the command. However, when you set the field from the unlinked table to the {?SurOrAnes}, there will be two prompts, first for the {?Which} and then a second screen will appear with {?Which} and {?SurorAnes} which will populate correctly--BUT you will have to manually change the {?Which} parameter to match your earlier selection. Neither approach is particularly intuitive.
If you decide to go one of these routes, let me know if you need help with the union command.
-LB