ActiveReports3 Request technical support
Cancel Method
See Also  Example


Cancels the report's processing. Any rendered pages will be cleared from the report's Document object.

Syntax

Visual Basic (Declaration) 
Public Sub Cancel() 
Visual Basic (Usage)Copy Code
Dim instance As ActiveReport3
 
instance.Cancel()
C# 
public void Cancel()

Example

C#Copy Code
private void rptDataDynamics_ReportStart(object sender, System.EventArgs eArgs)
{
   
if (this.DataSource==null)
   {
       
this.Cancel();
   }
}
Visual BasicCopy Code
Private Sub rptDD_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart
    If Me.DataSource Is Nothing Then
        Me.Cancel()
    End If
End Sub

Remarks

You can call this method based on a user's request or in a report event such as ReportStart to prevent printing a blank report if their data source did not return any records.

See Also