UNPKG

devexpress-reporting

Version:

DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.

24 lines (23 loc) 904 B
/** * DevExpress HTML/JS Reporting (designer\controls\utils\_subreportUtils.js) * Version: 25.1.3 * Build date: Jun 26, 2025 * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * License: https://www.devexpress.com/Support/EULAs/universal.xml */ import { collectionsVisitor, koUtils } from '@devexpress/analytics-core/analytics-internal'; export function subreportControlCollector(target, subreportControls = []) { if (!target) return subreportControls; const visitor = (target) => { if (target.controlType === 'XRSubreport') { subreportControls.push(target); subreportControlCollector(target['reportSource'], subreportControls); } }; visitor(target); collectionsVisitor(target, (collection) => { koUtils.unwrap(collection).forEach(visitor); }, ['controls', 'bands']); return subreportControls; }