Getting the height of the details section

T

Timbo

Hi All,

I have some VBA code behind the Format event of a report section. It's a
group footer section. All I want to do is get the total height of the
detail section, but when I use the following code I get back a value of 170
(I assume this is the original detail height in twips):

Dim vTotalHeight As long

vTotalHeight = Me.Section(acDetail).Height


I have to get the total height of the details section as I want to
programmactically change the height of my group footer.

Any ideas anyone?

Thank you very much.

Tim
 
D

Duane Hookom

I'm not sure how much luck you will have with this. You can check the height
of any control or section that "Can Grow" in the On Print event of the
section. This may be too late to "programmactically change the height of my
group footer".
 
T

Timbo

Thanks for the response.

Yes I do have the 'Can Grow' option selected and I have tried using the
OnPrint event and your right it is too late.

Any other ideas?

Thanks
 
D

Duane Hookom

You have only told us how you are attempting to do something and not why.
There may be a solution but we don't know what we are trying to solve.
 
G

Guest

Hi,

I have a similar problem:

I am grouping a report by product classes (e.g., pigments, dyes, process
chemicals) in the first level and trademark names in the second level. Each
of the footer sections has a height of 0.5 cm. How can I suppress a footer if
only it it breaks to a new page (in some cases resulting in an empty page)?
Any help is appreciated.

I do not work with "new line" after the section because sometimes the line
is really one line and more often than I like it looks like 5 or 6.
 
T

Timbo

Sorry for the delay.

I am trying to achieve this because I have a duplex document. One side has
data (using the Data section) the other side has a letter on it with only
one field (Group Footer 2. My problem is that the detailed side needs a
header and a footer, so I can achieve this with group headers and footers
(Group Headers and Footers 1), but I don't want the headers and footers to
appear on the letter side, so I throw a 'Force new page' on Group header 2
which gives me the desired results apart from - the text from 'Group Footer
1' is not appearing at the bottom of the page.

I hope this makes sense.

Another way of doing it would be to use page headers and footers, but I
would need to suppress them only on Group Footer 2 , and as all format
events for all sections fire I can't see a way to use this method.

You help is always appreciated usual.

Regards

Tim
 

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