Link to home
Create AccountLog in
Avatar of shobhitdixit
shobhitdixit

asked on

Visibility Property in Reporting Services

I am working in Reporting Services SSRS 2005. I have a date parameter which is populated by a SP. It passes
value on to the Report field =Parameters!Date.Value(0),=Parameters!Date.Value(1),=Parameters!Date.Value(2),.....
=Parameters!Date.Value(22)and accordingly the columns are made visible and invisible.

Now my issue is: I didn't write this
=Parameters!Date.Value(0) : the visibility property expression = iif(Parameters!Date.Value(0)<> First(Fields!ValueDate.Value, "SettleTimeSet"),True,False)
which works fine

But
=Parameters!Date.Value(1): the visibilty property expression =iif(Parameters!Date.Value.Length = "2",
     False,
       iif(Parameters!Date.Value.Length > "2",
           (iif(Parameters!Date.Value
           (Parameters!Date.Value.Length-1) > "0",False,True))
    ,True)
    )
.
.
.
.
.
.
=Parameters!Date.Value(5): the visibilty property expression ==iif(Parameters!Date.Value.Length = "6",
     False,
       iif(Parameters!Date.Value.Length > "6",
           (iif(Parameters!Date.Value
           (Parameters!Date.Value.Length-1) > "0",False,True))
    ,True)
    )


So if a user choses todays date + 3 days it will work fine, but if he doesn't choose todays date,

instead he chooses tomorrows date + 3 days, the result will not show tommorows date, but 3 dates after tomorrow


I believe there is something wrong with the expression. What i did was Paramter value= Date.value.Length
=Parameters!Date.Value(5): the visibility property expression ==iif(Parameters!Date.Value.Length = "5",
     False,
       iif(Parameters!Date.Value.Length > "5",
           (iif(Parameters!Date.Value
           (Parameters!Date.Value.Length-1) > "0",False,True))
    ,True)
    )

But this is not working and showing me error by generating one more column. say i choose tomorrow date +day after

This will show me tomorrow date + Day after + an extra column which is unwanted putting an #error sign on top
of parameter field.

Please help!
ASKER CERTIFIED SOLUTION
Avatar of shobhitdixit
shobhitdixit

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Chris McGuigan
Hi shobhitdixit,
You really are going to town on these date parameters, aren't you ;-)

If it's that same report from an earlier thread ... MATRIX!! :-)  Then you won't need all this.

Having said that;
Try testing for Nothing rather than "0", i.e. IsNothing(Parameters!Date.Value(5)), I think that's why you are getting the error.

Cheers
Chris