Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

SSRS passing as Parameter

$
0
0

 I have a table with fields

SELECT TOP 1000 [BAT_TYPE]
      
      ,[ITEM_TYPE]
  FROM [dbo].[BATT_TYPES]

bat_type  item_type
120-M  Batt
54-FM  Batt
45-FM    Batt
|
|
|
|
commercial Non-Batt
fuel            Non-Batt
tender          Non-Batt


I need to pass bat_type as drop down parameter which gives user
Batt, commercial, fuel , tender as values.

For parameter(@Bat_type) i created dataset using case: so that parameter has those values
select distinct
(
 CASE when bat_type = 'commercial' then 'commercial'
 when bat_type = 'fuel' then 'fuel'  
 when bat_type = 'tender' then 'tender'   
 
 else
 'Batt' END) AS Bat_type
from [dbo].[BATTERY_TYPES]

but how to compare them in main dataset.
select * from [dbo].[BATTERY_TYPES]
where bat_type IN (@Bat_type)
as bat_type is having different models under Batt its not showing data

Thanks in advance

ssm


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>