Skip to main content
All docs
V25.1
  • WebDocumentViewerExportSettings.UseSameTab Property

    Specifies whether to print and export documents in the browser tab that contains the Document Viewer.

    Namespace: DevExpress.XtraReports.Web.WebDocumentViewer

    Assembly: DevExpress.XtraReports.v25.1.Web.WebForms.dll

    NuGet Package: DevExpress.Web.Reporting

    Declaration

    [DefaultValue(true)]
    public bool UseSameTab { get; set; }

    Property Value

    Type Default Description
    Boolean true

    true, to print and export documents in the tab that contains the Document Viewer; false to open another browser tab for print and export.

    Property Paths

    You can access this nested property as listed below:

    Library Object Type Path to UseSameTab
    .NET Reporting Tools ASPxWebDocumentViewer
    .SettingsExport .UseSameTab
    ReportPreviewSettings
    .SettingsExport .UseSameTab
    ASP.NET MVC Extensions WebDocumentViewerSettings
    .SettingsExport .UseSameTab

    Remarks

    Use the UseSameTab property to specify whether to print and export documents in the same browser tab where the Document Viewer is placed, or in a separate tab.

    UseSameTab = True (Default)

    When a user clicks the Print toolbar icon, the Print dialog appears in the tab that contains the Document Viewer.

    The Print dialog

    When a document is printed, the Document Viewer displays an additional dialog with a link to the PDF file that was sent to the printer.

    An additional dialog

    This dialog helps users troubleshoot issues when the browser is unable to print a document. Disable the ShowPrintNotificationDialog property to hide this dialog. However, we recommend that your application should allow users to enable the ShowPrintNotificationDialog property or keep it enabled for cases when a browser stops printing documents after an update.

    You can localize the dialog with the following localization strings:

    UseSameTab = False

    When a user clicks the Print toolbar icon, the Document Viewer opens a new browser tab to display the Print dialog.

    The Print dialog in a new browser tab

    Code Examples

    ASP.NET Web Forms

    <dx:ASPxWebDocumentViewer ClientInstanceName="documentViewer" 
        ID="ASPxWebDocumentViewer1" runat="server">
        <SettingsExport UseSameTab="false" />
    </dx:ASPxWebDocumentViewer>
    

    ASP.NET MVC

    @Html.DevExpress().WebDocumentViewer(settings =>
    {
        settings.Name = "WebDocumentViewer1";
        settings.SettingsExport.UseSameTab = false;
    }).Bind("TestReport").GetHtml()
    
    See Also