Microsoft KB Archive/257501

= FIX: Error Message When Exporting Data Report to HTML File =

Article ID: 257501

Article Last Modified on 8/7/2007

-

APPLIES TO


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

-



This article was previously published under Q257501



SYMPTOMS
When you attempt to export a data report to an HTML file, the following error message is encountered:

Report width is larger than paper width



STATUS
Microsoft 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 latest 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:

http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx



MORE INFORMATION
The export feature of the data report is specifically coded to use only a paper size of 8.5 x 11 inches. When the paper's orientation is portrait, the maximum width of the report cannot exceed 8.5 inches. When the orientation is landscape, the maximum width should be 11 inches, but the value actually used is still 8.5. Therefore, when the orientation is in landscape, if the data report's total width exceeds 8.5 inches, you receive the error message even if that width is less than 11 inches.

Steps to Reproduce Behavior
 Change the default printer's page orientation to landscape. Create a new Standard EXE project in Visual Basic. Form1 is created by default. Add a Command button to Form1.  Paste the following code into Form1's code window: Private Sub Command1_Click DataReport1.Show End Sub  From the Project menu, select Add Data Environment. Set the properties of the connection to use the sample database, NWIND.MDB.</li> Add a Command button to Connection1.</li> Set the properties of Command1 to use the "Employees" table.</li> From the Project menu, select Add Data Repost.</li> Set the DataSource property of the data report to DataEnvironment1 and the DataMember property to Command1.</li> Set the ReportWidth property to 11520 (8 inches) and both the LeftMargin and RightMargin properties to 1440 (one inch). This gives a total report width of 10 inches, which is smaller than the current setting of 11 inches from the landscape printer setting.</li> Run the sample.</li> Click the Command button to see the data report. As you view the report, you can see that the print preview is displaying the page in landscape mode.</li> Click the Export button, give the file a name, and click the Save button. Note that you receive the error message referenced in the "Symptoms" section of this article.</li></ol>

Additional query words: sp4

Keywords: kbbug kbfix kbreportwriter kbvs600sp4fix kbvs600sp5fix KB257501

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.