I'm delivering a filter-on-the-fly report to my main client.
It's a report that, as part of the Open() event, opens up a little floater
screen that lets the user choose various filtering criteria and then, when the
user clicks "Apply", concocts some SQL and applies it to the report and
documents same by loading up a label in the report's header.
Only fly in the ointment is that I don't know how big the user's filter SQL will
be and I'd like to grow/shrink the label accordingly.
Brute force would be force new lines every so often, count the lines, multiply
the line count by the height of the font and resize the control accordingly.
Is there a more legant way? I know a text box can do the CanGrow/CanShrink
thing - but a text box doesn't work in this situation because it has to be
updated while the report thinks it's printing...and that doesn't seem to be
allowed.
Is there a more elegant way than counting lines?
--
PeteCresswell