DxDocumentViewerExportSettings.UseSameTab Property
Specifies whether to print and export documents in the browser tab that contains the Document Viewer.
Namespace: DevExpress.Blazor.Reporting
Assembly: DevExpress.Blazor.Reporting.v24.2.JSBasedControls.Common.dll
NuGet Package: DevExpress.Blazor.Reporting.JSBasedControls.Common
Declaration
Property Value
Type | Description |
---|---|
Boolean | true, to print and export documents in the tab that contains the Document Viewer; false to open another browser tab for print and export. |
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.
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.
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:
- ASPxReportsStringId.WebDocumentViewer_Print_Popup_Caption
- ASPxReportsStringId.WebDocumentViewer_Print_Popup_LinkText
- ASPxReportsStringId.WebDocumentViewer_Print_Popup_Text
UseSameTab = False
When a user clicks the Print toolbar icon, the Document Viewer opens a new browser tab to display the Print dialog.
Code Examples
Blazor Server App
<DxDocumentViewer ReportName=@ReportName Height="700px" CssClass="w-100">
<DxDocumentViewerExportSettings UseSameTab="false"/>
</DxDocumentViewer>
Hosted Blazor WebAssembly App
<DxWasmDocumentViewer ReportName="InvoiceReport" Height="calc(100vh - 130px)" Width="100%">
<DxDocumentViewerExportSettings UseSameTab=true></DxDocumentViewerExportSettings>
<DxWasmDocumentViewerRequestOptions InvokeAction="DXXRDV"></DxWasmDocumentViewerRequestOptions>
</DxWasmDocumentViewer>