Microsoft KB Archive/271692

= INFO: Avoid Truncation When You Use the DataReport ExportReport Method =

Article ID: 271692

Article Last Modified on 1/11/2001

-

APPLIES TO


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

-



This article was previously published under Q271692



SUMMARY
The ExportReport method of the Data Report designer provides a mechanism to export the text of a DataReport object to a file. Because this method works asynchronously, you need to be sure that there are no asynchronous operations still executing before you unload the DataReport.



MORE INFORMATION
When you use the ExportReport method, it is important to check the AsyncCount property of the DataReport before you unload the DataReport; otherwise, the output file may not contain the all of the text. This property returns the number of asynchronous operations that are still executing. When AsyncCount returns zero, it is safe to unload the DataReport. The following code fragment demonstrates this: DataReport1.ExportReport rptKeyHTML, &quot;c:\output.htm&quot;, True, False Do DoEvents Loop While DataReport1.AsyncCount > 0 Unload DataReport1

