AutoShrink/AutoGrow doesn't work in reporting...

I

Ilya

Hi, all!

Something really weird happens to one of the reports in our
application.
There is some field that gets it's value within the Detail_Print event
of the report. The field has Wuto Shrink and Auto Grow properties set
to "yes".
The weird thing is that for some reason some lines of this property do
not grow enough (like for 4 lines it makes space only for 3 and one
line is cut down) and for some lines it grows too much (for one line
it grows to accommodate 4 lines which results in mane wasted space).
I tried to use some API's to get the real width of the text that
should be printed within the control but this has no much help because
I can't set the Height property of the Detail object and the Height
property of the field while running in Detail_Print event.

Does anybody has a clue for this problem or some workaround?
All I need is the report to show the text which can be of different
length and I need to see all its contents without wasting space for
blank lines.

Another problem in the same report is that in Print Preview view I do
not see all the information the report actually shows. It means that
if I print the report as is it will print the information that is not
shown in Print Preview but should be shown. For example, one line of
the data I need to shrink/grow dynamically for, is blank but when I
print it out the data is printed.
The way to "fix" is to open the Page Setup by right clicking on the
report and just pressing OK without changing a thing...
Anybody has solution for it?

Thanks in advance,
Ilya
 
J

John Spencer

Could you use the FORMAT event instead of the PRINT event? Does that make a
difference?

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
I

Ilya

Could you use the FORMAT event instead of the PRINT event? Does that make a
difference?

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

Hello John,

Actually I've found a workaround: if within the query I send the data
to a function to format it as needed and then the field is set to be
bound to that field, the shrinking/growing works fine. Only when the
field is unbound and is changing in the print event the problem
occurs.

Next time I'll try the format event as you propose.

Thanks for your quick reply,
Ilya
 

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