Info 14.1 Avoid PDF page break after group headers
I have a DataTable I am exporting to PDF. The table is structured as following in Logi Info:
Element - ID
DataTable - dt1
HeaderRow - hdrRow
GroupHeaderRow - grpHeaderDoS
DataTableColumn - dtCol1
DataTableColumn - dtCol2
DataTableColumn - dtCol3
DataTableColumn - dtCol4
I know I can use the following CSS to apply the page-break avoid to my DataTableColumns:
[id^="dtCol1"] { break-inside: avoid; }
But I need to keep my GroupHeaderRow from being on page 1 with its DataTableColumns on page 2. I have tried every combination I can think of (the CSS is showing the class applied, but I can't figure out how to configure the class to keep the breaks from occurring between GroupHeaderRow and DataTableColumns):
[id^="grpHeaderDoS"] { break-after: avoid-region; }
We are also using the Printable Paging element to force the PDF to 8.5x11 portrait. I'm finding that sometimes this messes with the CSS:
<PrintablePaging MarginBottom=".25" MarginLeft=".25" MarginRight=".25" MarginTop=".25" PageHeight="8.25" PageWidth="10.75">
<PageFooter ID="footPageNum">
<Rows ID="rowsFooter">
<Row ID="rowFooter">
<Column Class="ThemeAlignRight" ID="colPageNum">
<Label Caption="Page @Function.PageNumber~ of @Function.PageCount~" Class="pdfPageNum" />
</Column>
</Row>
</Rows>
</PageFooter>
</PrintablePaging>
Any ideas of how to configure our CSS to avoid breaking between a GroupHeaderRow and its DataTableColumns?
Regards,
Johnny
-
I think part of the issue in using the css page break styling is how Logi structures a table during PDF export. In terms of HTML5 it is an invalid structure.
There are no THEAD or TBODY wrappers.The reason for this is Logi used to use an older version of the PDF export engine which required Logi to build out all kinds of conditional code in order to show column headers on each page and other table formatting concerns.
Their new PDF engine supports HTML5, however, Logi didn't change their custom syntax of the table HTML.
I know this doesn't resolve your issue, but it might bring to light why you are having the issue.0 -
Thanks VISUI
This is helpful information to have. I'm working with Logi Support but the solutions they are offering are not working as of yet (e.g. adding "PrinterPageBreak=True" as an attribute in the Group Header Row). Hoping some change has been made to 14.1 that will allow this to work as desired. I'll update if we make any progress.
Regards,
Johnny0 -
You should be able to achieve your desired result. I have an application I built for a client which had very similar requirements. The solution was partially to use a sub report and applying the following style to the subReport's container (more info row)
page-break-inside: avoid;
The application always exports the reports to HTML first then uses that HTML for PDF output. This was done for several reasons, one of which is that Logi's HTML export structure is more valid than its PDF exports HTML structure.
0 -
This article says a printer page break can't be done on group header row. Have you seen that yet? I'm sorry I have nothing else to contribute.
0
Please sign in to leave a comment.
Comments
4 comments