Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

vb.net2008 CR suppress print if nothing selected

In Crystal Reports Designer XI there is an option which suppress print if no data is selected.

So nothing happens if you print to printer and there is no data selected.

Is there a possibility having this behavior in my vb.net2008 CR application?

Using PrintToPrinter() with no data selected always prints a blank page.

I use following code:

Dim objReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument





objReport.PrintToPrinter(1, False, 0, 0)


Former Member
Former Member replied

I'm also concerned.

In VB6 using CR through RDC there was a turn around couting the number of record of the report :

Dim CrRep As New CRAXDRT.Report 
Dim NbRecordRead as integer
NbRecordRead = CrRep.PrintingStatus.NumberOfRecordRead

If CrRep.PrintingStatus.NumberOfRecordRead > 0 Then
    CrRep.PrintOut (False), 1
End If

But I can't find this property in .net model

Any help ?


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question