diff --git a/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/components/pages/basePage.js b/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/components/pages/basePage.js index 4473be3e441..5cb197797d7 100644 --- a/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/components/pages/basePage.js +++ b/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/components/pages/basePage.js @@ -106,12 +106,16 @@ function basePage() { '' + esc(this.columnHeader(c)) + '').join(''); const body = rows.map((r) => '' + columns.map((c) => '' + esc(cellText(r, c)) + '').join('') + '').join(''); + // Fixed table layout + column-count font scaling so a wide table fits the page instead of + // overflowing and being clipped at the right edge (mirrors the server-side XslFoRenderer PDF + // path). Long unbreakable tokens (ids, IBANs) wrap inside the fixed cell. + const fontSize = Math.max(6, 10 - Math.max(0, columns.length - 3)); const html = '' + esc(title) + '

' + esc(title) + '

' + '

' + rows.length + ' rows - ' + esc(new Date().toLocaleString()) + '

' diff --git a/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report-file/report.js.template b/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report-file/report.js.template index 88d9b87c9e7..ab0d68db3e0 100644 --- a/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report-file/report.js.template +++ b/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report-file/report.js.template @@ -299,12 +299,15 @@ document.addEventListener('alpine:init', () => { const esc = (v) => String(v == null ? '' : v).replace(/&/g, '&').replace(//g, '>'); const th = cols.map(c => '' + esc(c) + '').join(''); const body = rows.map(r => '' + cols.map(c => '' + esc(this.cellText(c, r)) + '').join('') + '').join(''); + // Fixed table layout + column-count font scaling so a wide table fits the page instead of + // being clipped at the right edge (mirrors the server-side XslFoRenderer PDF path). + const fontSize = Math.max(6, 10 - Math.max(0, cols.length - 3)); const html = '' + esc(this.displayName) + '

' + esc(this.displayName) + '

' + '

' + rows.length + ' rows' + (this.activeFilterCount ? ' (filtered)' : '') + ' - ' + esc(new Date().toLocaleString()) + '

' diff --git a/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report/table-page.js.template b/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report/table-page.js.template index 153673f5c8a..eec3a41dc55 100644 --- a/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report/table-page.js.template +++ b/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report/table-page.js.template @@ -75,12 +75,15 @@ document.addEventListener('alpine:init', () => { const cell = (col, row) => col.float ? this.displayNumber(row[col.key], col.pattern) : row[col.key]; const th = this.printColumns.map(c => '' + esc(c.label) + '').join(''); const body = rows.map(r => '' + this.printColumns.map(c => '' + esc(cell(c, r)) + '').join('') + '').join(''); + // Fixed table layout + column-count font scaling so a wide table fits the page instead of + // being clipped at the right edge (mirrors the server-side XslFoRenderer PDF path). + const fontSize = Math.max(6, 10 - Math.max(0, this.printColumns.length - 3)); const html = '${name}

${name}

' + '

' + rows.length + ' rows - ' + esc(new Date().toLocaleString()) + '

'