detail height problems

  • Thread starter Thread starter Keith G Hicks
  • Start date Start date
K

Keith G Hicks

After it has already grown, how do I determine the Height of a Detail
section that is set to Grow? If the detail height in the report designer is
set to 2 inches, and the detail grows to 2.5" due to long text in a control
(that is of course also set to grow), then when I run the code "msgbox
detail.height" I always get 2" (even if it's bigger due to growing). How
can I determine the actual "grown" height? Seems pretty useless if I cant.

Heres' why:

I have pages that will contain from 4 to 7 detail sections depending on how
big each detail actually is. I need to do 2 things. 1. once I've
determined the sum of the heigths of all the details on a single page, I
need to adjust the page header height so that the details are centered
vertically on the page. 2. each detail has a horizontal line under it, but
I dont' want that line to appear under the last detail on the page (not sure
how to do this - any advice would be nice). I think I need to do something
with counting the # of details on each page and then go back to the last one
(not sure how to do that) and set the bottom line to visible = false jsut
for that last detail.

Thanks,

Keith
 
YOu can use the TextWIdthHeight functions on my site to determine the
height of the control's in the Detail section during it's format event.
See:
http://www.lebans.com/textwidth-height.htm
TextHeightWidth.zip is a replacement for the Report object's TextWidth
and TextHeight methods. It is multiline aware and can work in both
Report and Form views. Includes a sample report to show you how to
autosize individual controls with different formatting on the same line
to simulate RTF style text.

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top