all groups > sql server reporting services > july 2005 >
You're in the

sql server reporting services

group:

Hide Report Items using Custom Code.


Hide Report Items using Custom Code. Anitha Naidu
7/13/2005 10:36:01 PM
sql server reporting services: Hi,
I have a main report which has some 10 tables/subreports i want hide some
tables/subreports based on some condition in custom code. for this i have
written a function in that the code below:

If Parameters!langid.value="Chinese" then
table2.visibility=hidden
end if
Will the above code works? for me it display error as table2 is not declared"

Please suggest me if any alternative.

Thanks in advance to helpers !

Regards,
Anitha




Re: Hide Report Items using Custom Code. Wayne Snyder
7/14/2005 7:52:06 AM
I have never tried to access object directly from the code but you might try
Report.table2.visibility=hidden..

What I normall do is have the function return the appropriate value, 1 or 0,
true or false, ect then call the function in the property expression ie

=Code.myfunc("parameters")


--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)

I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
[quoted text, click to view]

Re: Hide Report Items using Custom Code. Anitha Naidu
7/25/2005 1:53:02 AM
Hi Wayne,

Thank you forthe reply, instead of using custom code i had directly written
a property expression as per your suggestion, now its working fine.

Thank you for all of your cooperation.

Regards,
Anitha

[quoted text, click to view]
AddThis Social Bookmark Button