Wednesday, March 28, 2012

How to make subreport visible based on parameter condition?

Hi,

I have a subreport added to the main report and I want to make this report visible only when the parameter value is met.

Ex, I have a parameter CustName in the main report and want to show the subreport when the custName = xxxxx. There reports are parameter driven not data driven reports.

Any help is greatly appreciated.

Thanks,

Sirisha

When you are binding the Subreport and main report with a parameter , you can accomplish this by doing below steps.

1.) Click on Subreport and go the properties.

2.) In the second tab which is "Visibility" click on Expression radiobutton and press Fx button and paste this code.

=IIF(Fields!CustName.Value= "xxxxx",False,True)

Hope this helps...

|||Thanks Deepak, it worked great

No comments:

Post a Comment