DOCUMENT:Q291853 07-SEP-2001 [vbwin] TITLE :INFO: Avoid Page Skipping When You Print Multiple Data Reports PRODUCT :Microsoft Visual Basic for Windows PROD/VER::6.0 OPER/SYS: KEYWORDS:kbprint kbReportWriter kbVBp600 kbGrpDSVBDB kbDSupport ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Enterprise Edition for Windows, version 6.0 - Microsoft Visual Basic Professional Edition for Windows, version 6.0 ------------------------------------------------------------------------------- SUMMARY ======= If you print multiple data reports sequentially from a Visual Basic program, you may notice that pages of the reports are skipped. Because data report printing is done asynchronously, you must ensure that no asynchronous operations are pending before you print the next data report. MORE INFORMATION ================ The AsyncCount property of the DataReport object returns the number of asynchronous operations still executing. Use the AsyncCount property of DataReport in conjunction with the DoEvents method to complete any pending asynchronous operations before you print the next report. The following code segment demonstrates this: Report1.PrintReport While Report1.AsyncCount > 0 DoEvents Wend Report2.PrintReport REFERENCES ========== For more information about the AsyncCount property, see the following MSDN Web site: http://msdn.microsoft.com/library/devprods/vs6/vbasic/vb98/vbproasynccountproperty.htm For additional information about the ExportReport method, click the article number below to view the article in the Microsoft Knowledge Base: Q271692 INFO: Avoid Truncation When You Use the DataReport ExportReport Method Additional query words: ====================================================================== Keywords : kbprint kbReportWriter kbVBp600 kbGrpDSVBDB kbDSupport Technology : kbVBSearch kbAudDeveloper kbZNotKeyword6 kbZNotKeyword2 kbVB600Search kbVB600 Version : :6.0 Issue type : kbinfo ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2001.