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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scaling Report to Print to one Page

Status
Not open for further replies.

EasyTarget

Technical User
Apr 17, 2003
10
0
0
US
I have a loan amortization report that depending on the number of months of the loan will print that many detail lines.
12 month loan == 12 detail lines
24 month loan == 24 detail lines
60 month loan == 60 detail lines

I would like to be able to scale the report from 50% to 100%
depending on the number of detail lines in the report.
Mind you I will know the number of detail lines because I have a text box that stores the number of months of the loan.

I have looked at the PrtDevMode help file and tried to use the scale parameter.

If RecCount < 21 Then
DM.intScale = 100
Else
DM.intScale = 50
End If

Possible suggestions???
 
Scaling the entire report makes the report look quite cramped and difficult to read. Why don't you just change how the 12, 24, 36 detail lines print? Set the Font Size to your detail infomation to 8pt and set the height appropriate to 8 pt type. You also need to set the Can Grow property to Yes. Now in the On Format event procedure of the Detail Section change the Font Size according to the number of months of the loan:

Select Case Me.MonthsOfLoan
Case 12
me.Field1.FontSize = 14
. . . duplicate for all fields in detail section
Case 24
me.Field1.FontSize = 12
. . . duplicate for all fields in detail section
Case 36
me.Field1.FontSize = 8
. . . duplicate for all fields in detail section
End Select

The font size change will force the fields to grow in height and look appropriate to the number of records being printed on the page. You have to make the controls wide enough for the data to print at the largest font otherwise it will wrap around and grow vertically. The rest of the report Report Header and Footer, Page Header and Footer, Grouping Headers and Footers can setup with appropriate font sizes that are normally easier to read.

Let me know what you think. Does this work for your report.

Bob Scriver
 
Thanks for the idea but,

the problem with just scaling the fonts is that I have 14 columns of data and all of the font size's are currently set to 8, otherwise the data won't fit on the page.

I do fully understand about the sizing issue and the print quality concerns. The documents are just for internal use and scaling the output to fit on one page is really neccessary.

Any other possible suggestions.
 
I am also trying to scale a report that was designed for A4 paper to print on one page (letter size). Can you use the intScale to accomplish this? I have not had any luck.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top