Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make report automatically resize? 2

Status
Not open for further replies.

KimVong

IS-IT--Management
Sep 13, 2002
90
US
I have a report that sometimes have more fields, therefore it will not fit in one page at time. I would like to know if there is a way to have the report to automatically resize the the text to fit in one page.
Any help is greatly appreciated.

 
Kim,
There may be a solution to this problem. It will require that you write a procedure (in the Open event of the report) that will read through all the records of the query, then add up the lengths of all the fields. Using a simple varible (perhaps "intMaxRecordLength"??) that keeps track of the record that has the most number of characters, you will then be able to set the font size of the report. Of course, the report will be slower because you will be making two passes through the query. Make sense?

HTH, [pc2]
Randy Smith
California Teachers Association
 
Dumping text from reports or text boxes into a variable does not work too well, wrapping words makes it easy to count far less space than should be, allowing a possibility of making a font to small. I.E <<Any string here>> then kgroupejprej has been wrapped, and although it looks ok, the string count will be less than is likely to be required.

I have been focusing more on the size of text boxes while having the &quot;can grow&quot; property set to true, if your text needs more room, the text box height increases, this can be compared against the original height and the font made smaller to suit, im sure this could work the other way too. :D

Abig99
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top