PrintToPrinter printing a blank sheet of paper. (Crystal Reports 10 VB.Net 2005)

 When calling the PrintToPrint function of the CrystalReports ReportDocument, I had to build in a short wait after the report is loaded to ensure that a blank page would not be printed. The code below is from VB.NET 2005 and is using Crystal Reports 10.

Dim crptReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument

…(missing section of code)…

While Not crptReport.IsLoaded

System.Threading.Thread.Sleep(10)

End While

System.Threading.Thread.Sleep(10)

crptReport.PrintToPrinter(intCount, True, 0, 0)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.