devexpress-reporting
Version:
DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.
39 lines (38 loc) • 1.44 kB
JavaScript
/**
* DevExpress HTML/JS Reporting (designer\services\_reportScriptService.js)
* Version: 24.2.6
* Build date: Mar 18, 2025
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* License: https://www.devexpress.com/Support/EULAs/universal.xml
*/
import { DxDeferred, sendRequest } from '@devexpress/analytics-core/analytics-internal';
import { HandlerUri } from '../utils/settings';
import { PrepareRequestArgs } from '@devexpress/analytics-core/analytics-utils';
export class ReportScriptService {
static validateScripts(report) {
return sendRequest(HandlerUri(), 'validateScripts', PrepareRequestArgs({
report: JSON.stringify({
'XtraReportsLayoutSerializer': report.serialize()
})
}));
}
static getCompletions(editor, session, pos, prefix, callback, report, editorInstance, guid) {
if (guid) {
return sendRequest(HandlerUri(), 'getCompletions', PrepareRequestArgs({
Line: pos.row,
Column: pos.column,
Guid: guid,
Script: editorInstance.getValue()
}));
}
else {
return new DxDeferred().resolve().promise();
}
}
static setCodeDom(key, reportLayout) {
return sendRequest(HandlerUri(), 'setReportLayout', PrepareRequestArgs({
ReportLayout: reportLayout,
Key: key
}));
}
}