Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

Basic CASE Statement in Cascading parameterized report

$
0
0
Hi All,Writing a small CASE statement that in SQL Server. Below is what I'm try to accomplish.If the user selects 'MAC' as the input parameter in the report, SSRS should use below query.[code="sql"]BEGIN SELECT NetworkName, SampleTime, [Max] FROM vinny..PerfData_CPUServerView (nolock) Where NetworkName in (@ServerName) And SampleTime >= @StartDateTime and SampleTime <= CONVERT(date, DATEADD(dd, 1, @EndDateTime), 101) Order by SampleTime asc END[/code]Else it should this query.[code="sql"]BEGIN select NetowrkName.SnapshotTime, ProcessUsePct from vinny..SqlResourceUseHistoricView (NOLOCK) Where B.NetworkName in (@ServerName) And Snapshottime >= @StartDateTime and SnapshotTime <= CONVERT(date, DATEADD(dd, 1, @EndDateTime), 101) Order by SnapshotTime asc END[/code]I tried IF ELSE statement but SSRS is not giving results for cascading parameterized reports. Please help...

Viewing all articles
Browse latest Browse all 2791

Trending Articles