Auto-expand page header of report in response to test box "can grow"?

P

plh

Hi All,
I have a text box at the bottom of the page header. The text box's
"can grow" property is set to yes, but the page header prevents it
from growing. Changing page header property to "Auto Height" to yes
does not do it. Is there some way to make this happen?
Thanx,
-plh
 
A

Access Developer

plh said:
I have a text box at the bottom of the page
header. The text box's "can grow" property
is set to yes, but the page header prevents it
from growing. Changing page header property
to "Auto Height" to yes does not do it. Is
there some way to make this happen?

The property you desire is "Can Grow" for the Section, which in Classic
Access (2003 and earlier) Reports is available in the Header and Footer
Sections for Report, Group, and in the Detail Section. I presume (it's only
my guess) that it was omitted from the Page Header and Page Footer because
they are not "data connected" but "report format connected".

Given that is the situation, are you sure there isn't some alternative to
using a CanGrow Control in the Page Header? The way I tested this, I had to
write VBA code to store (arbitrary) text in a Can Grow Control to accomplish
the test (and I set the value of the Control in the Format event of the
PageHeaderSection).

You can set the Height property of the PageHeaderSection, in code, if you
keep elsewhere the original size of the PageHeaderSection less the Height of
your CanGrow Control. It will take some concentration and care in getting
all the nomenclature correct, and using VBA code in the Format and Print
events of the PageHeaderSection. I validated that it could be done, using a
sample report framework, and it was neither as intuitive, nor as simple, as
I'd hoped it would be.
 
M

Marshall Barton

plh said:
I have a text box at the bottom of the page header. The text box's
"can grow" property is set to yes, but the page header prevents it
from growing. Changing page header property to "Auto Height" to yes
does not do it. Is there some way to make this happen?


Right, the page header/footer sections can not grow.

Usually you can get the desired effect by creating a top
level group on a constant expression (e.g. =1 or ="pseudo
page hdr"). Then copy the controls you currently have in
the page header to the new group's headers section and set
the section's RepeatSection property to Yes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top