Sunday, February 26, 2012

Hiding two fields.

My report has two fields that are only visible if the report is for the
company "HOOSIER".
so in the two fields I wonted to hide I did this:
Visibility-->Hidden-->=iif(Fields!AgencyCode.Value = "HOOSIER","false","true")
Why does this generate an error?
The Hidden expression used in textbox "Textbox60" returned a data type that
is not valid.
Is not "false" and "true" not false and true?
or is there another way false and true have to be returned from an iif
statement?
Scott BurkeOn Oct 17, 11:28 am, Scott Burke
<ScottBu...@.discussions.microsoft.com> wrote:
> My report has two fields that are only visible if the report is for the
> company "HOOSIER".
> so in the two fields I wonted to hide I did this:
> Visibility-->Hidden-->=iif(Fields!AgencyCode.Value = "HOOSIER","false","true")
> Why does this generate an error?
> The Hidden expression used in textbox "Textbox60" returned a data type that
> is not valid.
> Is not "false" and "true" not false and true?
> or is there another way false and true have to be returned from an iif
> statement?
> Scott Burke
Try this: =iif(Fields!AgencyCode.Value = "HOOSIER",False,True) ,
further it would be good to check for NULL against AgencyCode using
Nothing(..
Thnaks.|||Try
iif(Fields!AgencyCode.Value = "HOOSIER",False,True)
Also good to check value of AgencyCode for NULL using nested IIF
Sambhaji|||That did it.
Normally I get an error if I dont "" the true and false.
I guess when they turn blue you dont need "".
Thank you
Scott Burke
"Sanraj" wrote:
> Try
> iif(Fields!AgencyCode.Value = "HOOSIER",False,True)
> Also good to check value of AgencyCode for NULL using nested IIF
> Sambhaji
>
>

No comments:

Post a Comment