Microsoft KB Archive/197915

= PRB: Report Width is Larger than the Paper Width =

Article ID: 197915

Article Last Modified on 3/7/2005

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q197915



SYMPTOMS
When printing or displaying a data report, the following error occurs:

Report Width is Larger than the Paper Width.



CAUSE
This error occurs because the width of your report exceeds the maximum width specified by the default printer.

When a report prints or displays the default printer settings in Control Panel are used to determine the layout of the report. If your default printer orientation is set up as Portrait and you design a report that extends beyond 8.5 inches wide, the preceding error occurs.

The width of the report is determined by taking the sum of the RightMargin, LeftMargin and the ReportWidth. If this exceeds the width of your default printer, the error occurs.

NOTE: The LeftMargin, RightMargin, and ReportWidth are denoted in twips.

1440 twips equate to 1 inch.



RESOLUTION
To resolve this problem you need to check the following:


 * 1) Make sure that there is no extra white space in the report. If there is any extra white space in the report, close up that section so that the ruler falls within the width of your default printer.
 * 2) Set your LeftMargin and RightMargin to 0.
 * 3) Check your printer setting to ensure that your default printer is set up correctly. If the report is landscape (that is, greater than 8.5 inches) the default printer should be set accordingly.

There is a .dll file named Pageset.dll that allows you to programmatically switch the default printer orientation. For information on how to obtain this DLL, please refer to the REFERENCES section of this article.