Robert Bollinger
2015-11-02 21:24:01 UTC
I am fairly new to SSRS but I think I am close to have this working. Just want to make sure I'm doing it correctly.
This is my main dataset and it works with the where statement associated with parameter @strServer
SELECT
uvwDBUsers.Server
,uvwDBUsers.DBA
,uvwDBUsers.DBName
,uvwDBUsers.UserName
,uvwDBUsers.db_owner
,uvwDBUsers.db_accessadmin
,uvwDBUsers.db_securityadmin
,uvwDBUsers.db_ddladmin
,uvwDBUsers.db_datareader
,uvwDBUsers.db_datawriter
,uvwDBUsers.db_denydatareader
,uvwDBUsers.db_denydatawriter
,uvwDBUsers.Cur_Date
FROM uvwDBUsers
where
(uvwDBUsers.Server = @strServer or @strServer = '<All>')
If I add another combo box (per the last line) to filter out DBAs, it works, but it breaks the first one. It no longer responds.
where
(uvwDBUsers.Server = @strServer or @strServer = '<All>'
and uvwDBUsers.DBA = @strDBA or @strDBA = '<All>')
Is this the proper TSQL where statement for adding additional combo boxes or is there a preferred, or best practices way.
Thank you,
Robboll
This is my main dataset and it works with the where statement associated with parameter @strServer
SELECT
uvwDBUsers.Server
,uvwDBUsers.DBA
,uvwDBUsers.DBName
,uvwDBUsers.UserName
,uvwDBUsers.db_owner
,uvwDBUsers.db_accessadmin
,uvwDBUsers.db_securityadmin
,uvwDBUsers.db_ddladmin
,uvwDBUsers.db_datareader
,uvwDBUsers.db_datawriter
,uvwDBUsers.db_denydatareader
,uvwDBUsers.db_denydatawriter
,uvwDBUsers.Cur_Date
FROM uvwDBUsers
where
(uvwDBUsers.Server = @strServer or @strServer = '<All>')
If I add another combo box (per the last line) to filter out DBAs, it works, but it breaks the first one. It no longer responds.
where
(uvwDBUsers.Server = @strServer or @strServer = '<All>'
and uvwDBUsers.DBA = @strDBA or @strDBA = '<All>')
Is this the proper TSQL where statement for adding additional combo boxes or is there a preferred, or best practices way.
Thank you,
Robboll