Is there a way to conditionally hide or show a parameter based on another parameter answer?
I have one parameter that is a list of different report types:
Type A
Type B
Type C
Report Type C has a budget amount associated with it, while A and B do not. If Type C is chosen, I'd like to have another parameter for budget amount to display.
I'm pretty certain that I can't hide/show a parameter based on another parameter, but maybe I'm wrong.
If I can't do that, I'd still like that budget amount to only apply towards report Type C. The only way I can think to do that would be two queries:
IF rpt_type = 'Type C'
BEGIN
select * from reports where rpt_type = @rpt
and budget >= @budget
END
ELSE
BEGIN
select * from reports where rpt_type = @rpt
END
I would prefer to not do this, but I can't think of a more elegant way to handle it. Any thoughts? Thanks!