Groups | Blog | Home
all groups > sql server reporting services > december 2005 >

sql server reporting services : Q: sub-report; show or not show


JIM.H.
12/7/2005 7:58:02 AM
Hello,
I have a sub-report and I need to show it if the data available otherwise
non of the data should be show including headers and title, how can I do this?
Thanks,
JIM.H.
12/8/2005 8:07:03 AM
Hi Greg,
Thanks for your help. Can I do this on the sub-report to show it or hide it
instead of going each item in sub-report and using iif?
Let’s say I have a parameter, if it is true, show sub-report, if not hide
it. Is this possible?



[quoted text, click to view]
Greg
12/8/2005 3:47:31 PM
Use iif statements on the visibility in properties of each object you want
hidden.

e.g.
=iif(fields!data1.value = 0 or fields!data1.value = "" or fields!data1.value
is system.dbNull,true, false)

says if the data is zero, an empty string or null then don't show it, else
show it.

hope that helps.

Greg


[quoted text, click to view]

Greg
12/8/2005 5:01:15 PM
Yes that should work fine, right click on the greyed out subreport on your
master report, go to properties and visibility and stick the expression in
the box.

=iif(parameters!name.value = "true",false, true)

if parameter is true then show else don't show.

Greg

[quoted text, click to view]

AddThis Social Bookmark Button