Skip to main content
All docs
V18.2

ASPxClientReportDesigner.CloseCurrentTab() Method

Closes the report tab currently being opened in the Web Report Designer.

Namespace: DevExpress.XtraReports.Web.Scripts

Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll

Declaration

public void CloseCurrentTab()

Remarks

This method enables you to close the tab that is currently active in the Web Report Designer. The Save Report dialog appears if the assigned report contains unsaved changes.

You can also use the CloseTab method to close a specific Report Designer tab. The method’s overload with the force parameter allows you to close the tab silently without saving the changes and showing the Save Report dialog.

The following example demonstrates how to use these methods.

<script type="text/javascript">
    function CloseSecondTab() {
        var tabs = reportDesigner.GetTabs();
        reportDesigner.CloseTab(tabs[1]);
    }

    function ForceCloseSecondTab() {
        var tabs = reportDesigner.GetTabs();
        reportDesigner.CloseTab(tabs[1], true);
    }
    function CloseCurrentTab() {
        reportDesigner.CloseCurrentTab();
    }
</script>

<div onclick="CloseSecondTab()">Close the Second Tab</div>
<div onclick="ForceCloseSecondTab()">Force Close the Second Tab</div>
<div onclick="CloseCurrentTab()">Close the Current Tab</div>
<dx:ASPxReportDesigner ID="ASPxReportDesigner1" ClientInstanceName="reportDesigner" runat="server"/>

You can handle the ReportTabClosing and ReportTabClosed events to respond to closing a report tab in the Web Report Designer.

See Also