locked
Tablix--- Visibility property is not working fine, need a small help RRS feed

  • Question

  • Hi Friends,

    I have small problem in my SSRS report.

    Retirement is : Have 2 input parameters(parm1, parm2), 3 tablix in my report. Based on input parameters what i have to pass trough the inputs parameters. My tablix should have to show OR hide based on 2 scenarios.



    Scenario 1: When i will enter the values in  parm1 then only tablix1 should have to shows remaining (2,3)tablix are in hide , using this expression (IIF(  Parameters!Parm1.Count > 0 and Parameters!Parm2.Count = 0 , TRUE,FALSE)) to show the tablix1


    Scenario 2: When i will enter the values in  parm2 then only tablix2 should have to shows remaining (1,3)tablix are in hide , using this expression (IIF(  Parameters!Parm1.Count = 0 and Parameters!Parm2.Count > 0 , TRUE,FALSE)) to show  tablix2

    Scenario 3: When i will enter the values in  parm3 then only tablix3 should have to shows remaining (1,2)tablix are in hide , using this expression (IIF(  Parameters!Parm1.Count > 0 and Parameters!Parm2.Count > 0 , TRUE,FALSE)) to show  tablix3


    BUT in my report scenairo 3  is not working as expected. if we enter the values in both parm1, parm2 . Tablix1, Tablix3 is showing in in SSRS report. I want to hide tablix1, tablix2 tables, Only tablix3 should be visible. 

    CAN ANYONE HELP ME how to fix the issue 









    • Edited by Priya.N Tuesday, August 11, 2020 12:50 PM
    Tuesday, August 11, 2020 12:17 PM

Answers

  • How would you "not enter" value to the parameter ?  Since multi value parameter won't accept null . You must enter something in the blank?


    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.

    • Marked as answer by Priya.N Monday, August 17, 2020 2:48 PM
    Thursday, August 13, 2020 8:46 AM

All replies

  • Hi Priya.N,

    When you enter any value even Null , the parameter.count will be 1 instead of 0. So this case is not that Scenario 3 is not working,  it is that the Scenario 1 & 2 not working. 

    I guess you have single value parameter and allow them to be Null, when you don't input any value ?

    If so , I suggest you to use expression like this 

    S1, on tablix1's visibility : 

    =IIF( Parameters!Parm1.Count > 0 and Parameters!Parm2.value is Nothing ,FALSE,TRUE)

    S2, on tablix2's visibility :

    =IIF( Parameters!Parm1.value is Nothing and Parameters!Parm2.Count >0 ,FALSE,TRUE)

    S3, on tablix3's visibility :

    =IIF( Parameters!Parm1.Count > 0 and Parameters!Parm2.Count >0 , FALSE,TRUE)

    If this is not your case, please clarify what your parameter input looks like and how they are getting their value.

    Regards,

    Joy


    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.

    • Proposed as answer by Joy_Zhao Friday, August 14, 2020 3:53 AM
    Wednesday, August 12, 2020 3:24 AM
  • hi ,

    I am using Multi value parameters like mentioned below. copying the values from excel and paste into the Parameter mentioned below.

    When i use the code what you have suggested above still i am getting 1,2 tablix shows data But it is not hiding. 


    • Edited by Priya.N Wednesday, August 12, 2020 5:12 AM Image
    Wednesday, August 12, 2020 5:10 AM
  • How would you "not enter" value to the parameter ?  Since multi value parameter won't accept null . You must enter something in the blank?


    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.

    • Marked as answer by Priya.N Monday, August 17, 2020 2:48 PM
    Thursday, August 13, 2020 8:46 AM
  • HI Joy,

    You are true, Thanks for you help.


    Monday, August 17, 2020 2:49 PM