Microsoft KB Archive/291853

= INFO: Avoid Page Skipping When You Print Multiple Data Reports in Sequence =

Article ID: 291853

Article Last Modified on 9/7/2001

-

APPLIES TO


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

-



This article was previously published under Q291853



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

