ActiveReports 6 Online Help
Clear Method (Selection)
Example 

Clears the current selection in the Report Designer.
Syntax
'Declaration
 
Public Sub Clear() 
public void Clear()
Example
/// <summary>
/// DesignView - updates the Design tab, sets defaults for the menu
/// </summary>
private void DesignView()
{    
    this.sb.Text = "Loading Report";
    this.ardMain.Selection.Clear();
    this.ardMain.Selection.Select(this.ardMain.Report);
    this.mnuFilePrint.Enabled = false;

    //Reset Menu Items
    this.mnuFileNew.Enabled = true;
    this.mnuFileOpen.Enabled = true;
    this.mnuFileSave.Enabled = true;
    this.mnuFilePrint.Enabled = false;
    this.mnuFileExport.Enabled = false;
    this.mnuFilePrintPreview.Enabled = true;
    this.mnuFormat.Enabled = true;
    this.mnuInsert.Enabled = true;
    this.mnuEditCopyPage.Enabled = false;
    this.mnuEditFind.Enabled = false;
    this.mnuFileExport.Enabled = false;
    this.mnuEditProperties.Enabled = true;
    this.mnuFileSaveAs.Enabled = true;
    this.mnuFileReportProperties.Enabled = true;
    this.sb.Text = "Ready";        
}
'DesignView - updates the Design tab, sets defaults for the menu
Private Sub DesignView()
    Me.sb.Text = "Loading Report"
    Me.ardMain.Selection.Clear()
    Me.ardMain.Selection.Select(Me.ardMain.Report)
    Me.mnuFilePrint.Enabled = False

    'Reset Menu Items
    Me.mnuFileNew.Enabled = True
    Me.mnuFileOpen.Enabled = True
    Me.mnuFileSave.Enabled = True
    Me.mnuFilePrint.Enabled = False
    Me.mnuFileExport.Enabled = False
    Me.mnuFilePrintPreview.Enabled = True
    Me.mnuFormat.Enabled = True
    Me.mnuInsert.Enabled = True
    Me.mnuEditCopyPage.Enabled = False
    Me.mnuEditFind.Enabled = False
    Me.mnuFileExport.Enabled = False
    Me.mnuEditProperties.Enabled = True
    Me.mnuFileSaveAs.Enabled = True
    Me.mnuFileReportProperties.Enabled = True
    Me.sb.Text = "Ready"
End Sub 'DesignView
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Selection Class
Selection Members

Send Feedback