Clears the current report.
Namespace:
C1.C1ReportAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
public void Clear() |
Visual Basic |
---|
Public Sub Clear |
Remarks
This method removes all groups, group sections, and fields from the current report.
It also resets the DataSource and Layout objects, and clears (but does not remove) the fixed sections that all reports have: Detail, Header, Footer, PageHeader, and PageFooter.
Use this method when you want to clear a report and start creating a new one from scratch.
Examples
The following code initializes the control, named c1r, clears the control's contents using the Clear method, and sets the control font (that will be assigned to new fields):
Copy CodeVisual Basic
' initialize control Dim c1r As C1.C1Report.C1Report With c1r ' clear any existing fields .Clear() ' set default font for all controls .Font.Name = "Tahoma" .Font.Size = 8 End With |
Copy CodeC#
// initialize control C1.C1Report c1r = C1.C1Report.C1Report; // clear any existing fields c1r.Clear(); // set default font for all controls c1r.Font.Name = "Tahoma"; c1r.Font.Size = 8; |