Welcome to MSDN Blogs Sign in | Join | Help
CanShrink does not work with RDLC when the textbox is within a data control like Table / Matrix

ISSUE: 

As per definition, http://msdn.microsoft.com/en-us/library/ms251779.aspx

Growing and Shrinking a Text Box
By default, text boxes are a static size. If you want to expand a text box vertically based on its contents, change the CanGrow property for the text box. If you want to allow the text box to shrink based on its contents, change the CanShrink property for the text box. You can access these properties through the Properties window or through the Textbox Properties dialog box.

But when you place the textbox within a data control like TABLE / MATRIX, the CanShrink property is never honored. At the same time the CanGrow property will always work as expected.

EXPLANATION:

This is "By Design" behavior. The table row/column will not shrink below its definition height/width. This is in order to mitigate performance and memory concerns. Also the impact should be minimal, since we allow the row to grow.

You start with  a small height for the table row and let it to grow to accommodate the content.

Posted: Thursday, October 09, 2008 9:11 PM by selvar
Filed under:

Comments

ivan said:

You workaround still does not work. As it grows all the time, even if you set row height to 0.05. Empty rows still appear at a larger height.

The other problem with that is you can't see what is on the report in Designer, you would need to resize it all the time, the context is not oblivious right away. So I think your "by design" is as usual done in Microsoftish way which would not accomodate real world scenarios. Why didn't you guys just use Access report designer, which is way better. Everybody I know that says Access reports are better.

# June 9, 2009 1:43 PM

Mike said:

Not sure about Ivan's experience that the row grows even when the text box(es) in it are empty... the workaround of making the row very small (0.001) to start with is working fine for me.

Would agree that the Access report designer would have been a great starting point for RDLC / RDC design.

# August 6, 2009 11:41 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker