how to add a drop down list
Report needs option to select multiple super product types
Selection of multiple super product types?
IF @superProductType = 'ALL'
INSERT INTO #ProductDetails
SELECT pt_sp_type_c, pt_sb_type_c
FROM product..p_type_p_type
WHERE pt_sp_type_c NOT IN ('EQUITY','OPTEQTY')
AND p_type_use_sp_c= 'RPCDB'
AND p_type_use_sb_c = 'TRD'
AND pt_rel_stat_c = 'ACTIVE'
ELSE
INSERT INTO #ProductDetails
SELECT pt_sp_type_c, pt_sb_type_c
FROM product..p_type_p_type
WHERE pt_sp_type_c NOT IN ('EQUITY','OPTEQTY')
AND pt_sp_type_c IN (@superProductType)
AND p_type_use_sp_c= 'RPCDB'
AND p_type_use_sb_c = 'TRD'
AND pt_rel_stat_c = 'ACTIVE'
I have a parameter here @super product type,can anyone help me how to change this code Here in this c开发者_如何学Pythonode i need to make some changes: ---parameter is @superProductType The above code was for the option to select multiple super product types
when i select All and one value from the drop down list like 'ALL','ASKF' both the above conditions in the code if else will fail It should not get selected ALL and other ASKF at the same time either should has to select How can we differentiate that ALL not selecting ALL from together if we select ALL remaining values in the drop down list must be deleted It should not have two values selected together IF ALL only ALL has to select remaining should discard
I am not sure how to eliminate the rest of values in the drop down list
looking for suitable solution,can anybody see the code abnove and tell me what is the change i have to do in the code.
If you have set the SSRS parameter to Multivalue then you should change the query to use IN (@ParamName) syntax. so your query would become:
IF @superProductType = 'ALL'
INSERT INTO #ProductDetails
SELECT pt_sp_type_c, pt_sb_type_c
FROM product..p_type_p_type
WHERE pt_sp_type_c NOT IN ('EQUITY','OPTEQTY')
AND p_type_use_sp_c= 'RPCDB'
AND p_type_use_sb_c = 'TRD'
AND pt_rel_stat_c = 'ACTIVE'
ELSE
INSERT INTO #ProductDetails
SELECT pt_sp_type_c, pt_sb_type_c
FROM product..p_type_p_type
WHERE pt_sp_type_c NOT IN ('EQUITY','OPTEQTY')
AND pt_sp_type_c IN ( @superProductType )
AND p_type_use_sp_c= 'RPCDB'
AND p_type_use_sb_c = 'TRD'
AND pt_rel_stat_c = 'ACTIVE'
精彩评论