Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Hide/Show parameter based on another parameter Expand / Collapse
Author
Message
Posted Friday, April 19, 2013 2:24 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, January 30, 2014 2:09 PM
Points: 29, Visits: 135
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!



Post #1444604
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse