Groups | Blog | Home
all groups > sql server reporting services > may 2007 >

sql server reporting services : how to hide a subreport


Bernhard Held
5/15/2007 12:00:00 AM
hey there gurus,

I am a newbie to reporting server...and so i have a nice question for
you gurus.

I have a subreport, which is based on to parameters. now the problem is
that in some special cases these parameters are empty.

so for that I would love to hide the subreport in case parameters are
empty. I have tried a lot of things to accomplish my task but with no luck.

maybe some of you guys can tell me how to hide a subreport if it is
empty or false?

thank you very much in advance,

best regards,
bernhard
Peter De Rop
5/15/2007 7:33:02 AM
[quoted text, click to view]

For all these kind of things, iif is your friend.
Click on the subreport and scroll down in the properties panel. You should
find Hidden in there somewhere.
In that box, click the down arrow and choose "expression". In the
expression, type :
=iif(Fields!TheFieldYouWishToEvaluate.Value = "",True, False)

If the value of that field is empty, the subreport will not be shown.

Peter
AddThis Social Bookmark Button