Dynamic table split

I have details record present in my datamapper. On the first page I have ~1.5inch of space where details should be present. That are should fit 6 details row. The rest of details should be placed on the following pages. I configured already 2 master pages with proper header and footer to achieve it. However I’m facing with an issue, that instead of having 6 rows on first page and one row on the second page, I always get 5 on the first and 2 one the next page. There is already enough space to fit 6th row but it gets pushed into the next page. Am I missing something?

Please check you orphan / widow setting for your table.

Indeed. Setting them to 1 fixed this issue. Btw, why are defaults set to 2?

I’m also curious if it’s possible to layout records in N order. Let’s say the whole table has only 3 columns (like in this example: Amount, Reference and Descripion) and records are filled in on the left page side and then on the right. Then on the next page, same way, first left page side and right. And so on.

There is no out-of-the-box feature for that but could be achieved using scripting. It may impact performance though. Could provide a sample if you are interested.

Hi, @Erik currently, i am working with dynamic tables and i want to print its content like mentiend in @mariusz.fik 's response . could you help me please? image

@meriem I got a bit of a creative solution and cobbled together the attached template.

It doesn’t use tables but relies on Flex box layout. The main text container is a div element for which I have set the number of columns to 2 (see the cases_styles.css).

Each line a simple HTML structure fetched from a Handlebars snippet. A script iterates of the detail data and adds this strucuture for each detail line. The scripts checks of this box with columns overflows using the overflows() command from the OL Connect Designer scripting API. When there is overflow it reverts the last step and adds a new two column box after the initial one.

I ran some quick tests and it seems to do the trick (I did not check performance for larger data sets). Perhaps things are a bit unconventional but think it is still interesting to share.

I’ve used .json data for testing. Choose File > Add Data > JSON Sample Data to load this file (or click the Sample Data icon on the toolbar of the Data Model view).

Hope this helps,

Erik

table-flow.zip (8.4 KB)
columns-overflows-table-withheaders.OL-template (24.0 KB)

Thanks @Erik for the help.

Actually i’m using the version 2021.2 , i can’t open the template.

I think handelbars not supported by my version. I’ve already tested the column-count:2 property on the tables, but it didn’t work.

if you have any ideas or suggestions to share on this topic, your contribution would be greatly appreciated and beneficial to me.

Ps: i think, i should update the version.

Thanks for your collaboration
Meriem

Try the one attached… reworked a bit so it does not use Handlebars.

columns-overflows-table-withheaders-nohbs.OL-template (24.1 KB)

Thanks @Erik ,

I’ll check it out and let you know.