Skip to main content
A newer version of this page is available. .
All docs
V21.1

ExportSettings.UseSameTab Property

Specifies whether the print and export operations are performed in the same browser tab with the Document Viewer control.

Namespace: DevExpress.XtraReports.Web.WebDocumentViewer.DataContracts

Assembly: DevExpress.XtraReports.v21.1.Web.dll

NuGet Package: DevExpress.Web.Reporting.Common

Declaration

[DataMember(Name = "useSameTab")]
public bool UseSameTab { get; set; }

Property Value

Type Description
Boolean

True to perform operations in the same tab; false to open another browser tab for print or export.

Property Paths

You can access this nested property as listed below:

Object Type Path to UseSameTab
DxReportDesignerReportPreviewSettings
.ExportSettings .UseSameTab
ReportPreviewSettings
.ExportSettings .UseSameTab
WebDocumentViewerModel
.ExportSettings .UseSameTab

Remarks

If this option is set to true, the Export commands create and download the exported document in the same browser tab. The Print command creates the PDF document and starts the browser Print dialog. The Print command also displays a dialog that allows the user to download the PDF file if the browser cannot print the document or the printout is incorrect.

UseSameTab Printing

The popup dialog contains texts localizable with the following localization strings:

Code Examples

ASP.NET Core

@{
    var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer")
        .Height("1000px")
        .ExportSettings(settings =>
        {
            settings.UseSameTab = true;
        })
        .Bind("TestReport");
    @viewerRender.RenderHtml()
}

Angular

 

report-viewer.html

<dx-report-viewer [reportUrl]="reportUrl" height="800px">
    <dxrv-request-options [invokeAction]="invokeAction" [host]="hostUrl"></dxrv-request-options>
    <dxrv-export-settings [useSameTab]="useSameTabExport"></dxrv-export-settings>
</dx-report-viewer>>

 

report-viewer.ts

import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';

@Component({
  selector: 'report-viewer',
    encapsulation: ViewEncapsulation.None,
    templateUrl: './report-viewer.html',
  styleUrls: [
    //...
  ]
})
export class ReportViewerComponent {
    reportUrl: string = "TestReport";
    invokeAction: string = '/DXXRDV';
    useSameTabExport: boolean = true;
: boolean = true;
    // ...
}
See Also