Height of page header depending on text field height?! (1 Viewer)

perlfan

Registered User.
Local time
Today, 11:18
Joined
May 26, 2009
Messages
192
Hi there,

with VBA I would like to dynamically adapt the height of a report's page header depending on the height of a certain text field, which is expandable. The problem is, even though the field is expandable, I always get the same value for textfieldXY.height, no matter how high it is in report view. So I guess that the height value doesn't change depending on the displayed contents. In the end, it's important for me that the detail area below is directly connected to this text field, without any useless space in between.
Can somebody help?? Thanks a lot in advance!! FRANK
 

vbaInet

AWF VIP
Local time
Today, 18:18
Joined
Jan 22, 2010
Messages
26,374
Look into using a subreport and set the subreport's Can Grow and Can Shrink properties to Yes, as well as setting the same properties for the section in which the subreport was placed.
 

perlfan

Registered User.
Local time
Today, 11:18
Joined
May 26, 2009
Messages
192
Currently, the text field is placed in the page header. It's plain text that goes into the text field. So you are saying that I could fill the subreport with my text (text depends on variables, so it's not always the same) and the subreport would dynamically expand and collapse, and so would the page header because it contains the subreport?`Thanks for clarification. Never worked with subreports, so I would rather want to stick to simple text fields. Regards, Frank
 

vbaInet

AWF VIP
Local time
Today, 18:18
Joined
Jan 22, 2010
Messages
26,374
If the textbox is in a section that has the Can Grow and Can Shrink properties, then the section will expand and contract if those properties were set. Otherwise, you will need a subreport.

Subreports are quite handy so sooner or later you will need to use them. ;)
 

perlfan

Registered User.
Local time
Today, 11:18
Joined
May 26, 2009
Messages
192
Thanks again for your input. As this report has only one page, I decided to simply use the enlargeable report header instead of the page header which cannot dynamically grow/shrink. FRANK
 

Users who are viewing this thread

Top Bottom