Monday, June 9, 2014

How to Prevent Blank Page/white space when a Rectangle is hidden in RDLC

Hi All,
   I had a requirement where in I want to hide Rectangle (which had tablix and charts inside it) to show and hide based on query string parameters. The requirement was working fine when it is showing the Rectangle but when the rectangle is hiding it is generating Blank Page.

I searched a lot for a solution and came to know one trick which i would like to share with you .

I took a  new Table(Tablix) . 
Select the Row of the tablix and apply the same visibility expression on the Row visibility that I have applied on Rectangle .
Now drag the rectangle inside the Table row cell , in which you have applied expression .Thats it...!!!
Now check , it will not render Blank page / white space any more... :-)


Point to Note : One thing that only I have noticed and would like to tell you..First apply the Row visibility Expression and then only drag the Rectangle inside the Row cell of the table. This is because , I wasn't able to select the row , if you dragged the Rectangle first.. If you try to select Row, Rectangle gets selected....



Hope it helps!!!

Thanks ,
Nitin Sharma