|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Monday, December 24, 2012 10:26 PM
Points: 16,
Visits: 77
|
|
Can anybody tell me how to hide/show multiple columns based on multivalued parameter. ex :i have two parameters 1)item 2)option(multivalued - ven,itm,qty) and values are (venr,itm,qty).
i have a dataset contains 3 columns vendor,itm,qty.based on the item i select in the "item" parameter it fetches the respective ven, itm,qty,i want to select which column to be displayed,for this i have created option (multivalued parameter) and used the below mentioned condition in the respective column visibility expression:
=IIf(Parameters!option.Value(0) = "ven",FALSE,TRUE) =IIf(Parameters!option.Value(0) = "itm",FALSE,TRUE) =IIf(Parameters!option.Value(0) = "qty",FALSE,TRUE).
its working fine if i select any one option in option parameter.its not working if i select more than option in option parameter.thta why i cant hide/show more than 1 column at a time.
 |  |  |  |
1.JPG
(10 views, 110.75 KB) |
|
2.JPG
(7 views, 111.38 KB) |
|
3.JPG
(6 views, 111.52 KB) |
|
|
|  |  |  |  |
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: 2 days ago @ 12:35 PM
Points: 6,650,
Visits: 5,666
|
|
I believe you have to nest your IIF code to account for all possible permeations of the parameters. It's been a while since I used SSRS, though, so I'm not 100% on that.
Brandie Tarvin, MCITP Database Administrator, MCDBA, MCSA
Webpage: http://www.BrandieTarvin.net LiveJournal Blog: http://brandietarvin.livejournal.com/ On LinkedIn!, Google+, and Twitter.
Freelance Writer: Shadowrun Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: 2 days ago @ 4:59 AM
Points: 139,
Visits: 469
|
|
yudy.varma (9/1/2012) Can anybody tell me how to hide/show multiple columns based on multivalued parameter. ex :i have two parameters 1)item 2)option(multivalued - ven,itm,qty) and values are (venr,itm,qty).
i have a dataset contains 3 columns vendor,itm,qty.based on the item i select in the "item" parameter it fetches the respective ven, itm,qty,i want to select which column to be displayed,for this i have created option (multivalued parameter) and used the below mentioned condition in the respective column visibility expression:
=IIf(Parameters!option.Value(0) = "ven",FALSE,TRUE) =IIf(Parameters!option.Value(0) = "itm",FALSE,TRUE) =IIf(Parameters!option.Value(0) = "qty",FALSE,TRUE).
its working fine if i select any one option in option parameter.its not working if i select more than option in option parameter.thta why i cant hide/show more than 1 column at a time.
I guess you have taken the first value out of the three values in Multiselect parameter. "=IIf(Parameters!option.Value(0) = "ven",FALSE,TRUE)"
You have to remove that array index values for the expression. Instead Join them using "=JOIN(Parameters!option.Value,",")" and then use a like filter in the expression.
--Divya
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: 2 days ago @ 4:59 AM
Points: 139,
Visits: 469
|
|
Divya Agrawal (9/13/2012)
yudy.varma (9/1/2012) Can anybody tell me how to hide/show multiple columns based on multivalued parameter. ex :i have two parameters 1)item 2)option(multivalued - ven,itm,qty) and values are (venr,itm,qty).
i have a dataset contains 3 columns vendor,itm,qty.based on the item i select in the "item" parameter it fetches the respective ven, itm,qty,i want to select which column to be displayed,for this i have created option (multivalued parameter) and used the below mentioned condition in the respective column visibility expression:
=IIf(Parameters!option.Value(0) = "ven",FALSE,TRUE) =IIf(Parameters!option.Value(0) = "itm",FALSE,TRUE) =IIf(Parameters!option.Value(0) = "qty",FALSE,TRUE).
its working fine if i select any one option in option parameter.its not working if i select more than option in option parameter.thta why i cant hide/show more than 1 column at a time.I guess you have taken the first value out of the three values in Multiselect parameter. "=IIf(Parameters!option.Value (0) = "ven",FALSE,TRUE)" You have to remove that array index values for the expression. Instead Join them using "=JOIN(Parameters!option.Value,",")" and then use a like filter in the expression. You can use = IIF(JOIN(Parameters!option.Value,",")" Like "*ven*",False,True)
--Divya
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Monday, December 24, 2012 10:26 PM
Points: 16,
Visits: 77
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: 2 days ago @ 4:59 AM
Points: 139,
Visits: 469
|
|
yudy.varma (9/14/2012) Thnks divya..its working
I am glad it helped you :)
--Divya
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Monday, May 06, 2013 6:38 AM
Points: 1,762,
Visits: 462
|
|
I was looking at a similar problem and that is a smart solution Divya - thank you
Tom in Sacramento
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
|
|
|
|