FIX: Error Message "Report Width Is Larger Than the Paper Width" When Showing Data Report in Landscape (261193)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q261193 SYMPTOMS
When using the Show method of Data Report to preview the report, the page orientation defaults to the default printer settings on the local computer. Therefore, if the orientation of the default printer settings is set to Portrait of standard Letter paper and your report width is more than 8.5 inches wide, 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 settings. The width of the report is determined by taking the sum of the RightMargin, LeftMargin, and ReportWidth properties.
When a report prints or displays, the default printer settings in the Printers Folders are used to determine the layout of the report. Because the Printer object in Visual Basic cannot modify the default printer settings, if your default printer orientation is set to Portrait of standard Letter paper and you design a report that extends beyond 8.5 inches wide, the preceding error occurs.
NOTE: The LeftMargin, RightMargin, and ReportWidth properties are denoted in twips, and 1440 twips equal 1 inch.
RESOLUTION
Microsoft Visual Studio 6.0 Service Pack 4 and later service packs include a new property called Orientation for Data Report. The value for this property is:
- rptOrientDefault = 0
- rptOrientPortrait = 1
- rptOrientLandscape = 2
With this property, you are able to tell the Data Report not to use the orientation setting of the default printer in the Printers Folders. Following is the syntax for implementing the Orientation property:
DataReport1.Orientation = rptOrientLandscape
DataReport1.Show
When you use this new Orientation property in Visual Studio 6.0 Service Pack 4, you may encounter the error below:
Compiler Error
Method or Data member not found.
To fix this error, delete the values for DataMember and DataSource properties of the Data Report and reassign these two properties with the original values.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in the next service pack for Visual Studio 6.0. For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base: 194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295 HOWTO: Tell That a Visual Studio Service Pack Is Installed To download the latest Visual Studio service pack, visit the following Microsoft Web site: REFERENCES
This article fixes the problem addressed in the following article:
197915 PRB: Report Width is Larger than the Paper Width
Modification Type: | Minor | Last Reviewed: | 12/12/2005 |
---|
Keywords: | kbBug kbDatabase kbfix kbVS600sp4fix kbVS600sp5fix KB261193 |
---|
|