xtrareports-js-devexpress-dot-reporting-dot-viewer-dot-settings-dot-clipboardseparator-1.md
Specifies a character sequence that separates values of selected bricks when copied to the clipboard.
export const ClipboardSeparator: DevExpress.Analytics.Internal.IGlobalSubscribableValue<string>
| Name | Type | Description |
|---|---|---|
| newVal | string |
Any character or character sequence.
|
| Type | Description |
|---|---|
| string |
Any character or character sequence.
|
The default value is an empty string. The following code snippets set the ClipboardSeparator value to \t in different applications. Tab-separated content can be easily inserted into an Excel file with each brick value in a separate cell.
<script type="text/javascript">
function onBeforeRender() {
DevExpress.Reporting.Viewer.Settings.ClipboardSeparator('\t');
}
</script>
@{
var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer")
.Height("100%")
.ClientSideEvents(configure => configure.BeforeRender("onBeforeRender"))
.Bind(Model);
@viewerRender.RenderHtml()
}
<script type="text/javascript">
function onBeforeRender() {
DevExpress.Reporting.Viewer.Settings.ClipboardSeparator('\t');
}
</script>
@Html.DevExpress().WebDocumentViewer(settings =>
{
settings.Name = "WebDocumentViewer1";
settings.ClientSideEvents.BeforeRender= "onBeforeRender";
}).Bind(Model).GetHtml()
<script type="text/javascript">
function onBeforeRender() {
DevExpress.Reporting.Viewer.Settings.ClipboardSeparator('\t');
}
</script>
<dx:ASPxReportDesigner ID="ASPxReportDesigner1" runat="server">
<ClientSideEvents BeforeRender="onBeforeRender"/>
</dx:ASPxReportDesigner>
window.viewer = {
onBeforeRender: function (s, e) {
DevExpress.Reporting.Viewer.Settings.ClipboardSeparator('\t');
}
};
<head>
@...@
@DxResourceManager.RegisterScripts((config) => config.Register(new DxResource("/customizations.js", 900)))
@...@
</head>
@page "/documentviewer"
<DxDocumentViewer ReportName="XtraReport1" Height="calc(100vh - 130px)" Width="100%">
<DxDocumentViewerCallbacks BeforeRender="viewer.onBeforeRender" />
</DxDocumentViewer>
import { ClipboardSeparator } from 'devexpress-reporting/dx-webdocumentviewer'
// ...
export class AppComponent {
title = 'DXReportViewerSample';
reportUrl: string = 'Products';
hostUrl: string = 'https://localhost:5000/';
invokeAction: string = "/WebDocumentViewer/Invoke";
onBeforeRender() {
ClipboardSeparator('\t');
}
}
<dx-report-viewer [reportUrl]="reportUrl" height="800px">
<dxrv-request-options [invokeAction]="invokeAction" [host]="hostUrl"/>
<dxrv-callbacks (BeforeRender)="onBeforeRender($event)" />
</dx-report-viewer>
'use client';
import { ClipboardSeparator} from 'devexpress-reporting/dx-webdocumentviewer'
//...
function App() {
const viewerRef = React.useRef<DxReportViewerRef>();
const onBeforeRender = (event: any): void => {
ClipboardSeparator('\t');
};
const exportDocument = () => viewerRef.current?.instance().ExportTo('xlsx');
return (
<>
<ReportViewer ref={viewerRef} reportUrl="TestReport">
<RequestOptions host="http://localhost:5000/" invokeAction="/DXXRDV" />
<Callbacks BeforeRender={onBeforeRender} />
</ReportViewer>
</>
)
}
export default App