INFO: Avoid Page Skipping When You Print Multiple Data Reports in Sequence (291853)



The information in this article applies to:

  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0

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  
				

REFERENCES

For more information about the AsyncCount property, see the following MSDN Web site: For additional information about the ExportReport method, click the article number below to view the article in the Microsoft Knowledge Base:

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


Modification Type:MajorLast Reviewed:9/7/2001
Keywords:kbDSupport kbinfo kbprint kbReportWriter KB291853