How to supress a subreport?

Posted by Laghaterohan under Regular Expressions on 10/30/2010 | Points: 10 | Views : 1093 | Status : [Member] | Replies : 2
Hello,
Good Morning.


Can any one tell me how to supress a subreport? My Dataset returns 4 tables. In my 4th table sometimes i have no rows. In such case i want the subreport associated with that table should not be displayed.
How to achieve this?

Even the IsNuLL FUNCTION is not working for me.

Any idea how to achieve this?

Best Regards,
Rohan Laghate



Responses

Posted by: T.saravanan on: 10/30/2010 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Check the following condition...
Here ds -->DataSet

if(ds.Tables[4].Rows.Count > 0)

{
//Enable the Report
}
else
{
//Disable the Report
}


Cheers :)

Thanks,
T.Saravanan

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Laghaterohan on: 10/30/2010 [Member] Starter | Points: 25

Up
0
Down
Hey i am not getting it. The solution is not working. Can we supress the subreport from code behind ? (C#) how to do it?

I want to supress the subreport if the table associated with that table has no rows.....

Please help me...

Thanks,
Rohan

Best Regards,
Rohan Laghate

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response