Is it possible to have some rows with fixed values inside the details table? However the rows will only be displayed under a certain condition, in the example below, if “item bundle” is displayed, there would be some subitems displayed. These subitems have fixed values is in yellow while the Items from Details table is in cyan.
I’m assuming that the static info will always be the same for a row that contains “ItemBundle” within a detail table. This is my take on how to do this. You can probably expect a OL dev to chime in and make my method minuscule but hey we are all learning and I like new challenges.
Ok, if the sub items are static and will always have the same values in numbers and qunatities, then simply deign your dynamic table, then add a script which tragerts the following selector: #table tbody tr:
However, if the sub items are also dynamic in nature and their quantities from 1 to n sub items, then we are talking about nested dynamic tables which can be achieved in several ways based on your data mapper. Please confirm whether this is the case.
thanks for your reply, actually the details for the sub items would come also from the details table in the datamapper module, it’s only matter of displaying it at the print file, The only challenge that remains is that if the rows reached 8, how would the designer program print the same page that contains the remaining data in the table. I would also like to know how PReS Connect handles overflowing of data
Thanks for helping me with the challenges that I’ve encountering in PReS Connect. Yes you’re correct the subitems are static and only contained 4 rows, though the data for this came from the details table of my datamapper module, It is only a matter of displaying it in the designer.
Remember that for overflow to work, the dynamic table must be at the “root” of the template and not within another element. Any <tr> added dynamically must contain the attribute data-breakable, with a unique value, as well as the data-repeat attribute. So, for example, <tr data-repeat=“” data-breakable=“subItem0”>. These <tr> elements should be added to the <tbody>.
Since the subitems are also part of the detail table, proceed as follow:
Create your dynamic table without the subitems.
To add the subitems where necessary, use below script (edit as needed):
You should also noctice that by default a dynamic table has widows and orphans properties set to 2 and thsis might affect how the table overflows. You should try setting these values to 0 in the properties of table. (Right-click on the table and click on Table…)
Thank you for the tips regarding the overflow and the data structure for the sub items. I was able to do the sub items part myself ;however regarding overflows, There are certain rules I need to follow regarding this;
If the Details table would display the “item bundle” first, preceding items would be automatically printed on the next page.
If the “item bundle” is the second data to be printed in the details table, It would still be displayed in the first page. However if the “item bundle” is the 3rd or 4th data, it would be displayed on the second page.
If the details table doesn’t contain “item bundle” in its list, The items would all be printed in the first page (maximum would be 4 items, extra items would be printed in the 2nd page)
*Please take note that the second page has similar contents as the first page, the only difference would be the contents of the details table. (Just like a billing statement)
Is it possible to place the table contents after applying the page-break at the same position as the table contents of the first page? Another question, Is it possible that the only elements affected by the page break is the table only? Anything printed after the table should not be affected by the page break.
Is it possible to place the table contents after applying the page-break at the same position as the table contents of the first page?
This is possible but it all depends on your how the finshed template should look like. The most common option is to use a Master Page with a bigger top margin for overflowing pages. So add a new Master Page with bigger top margin, right-click on your Section and click on Sheet Configuration…, then untick the “Same for all positions” option and configure the middle sheets to use the new master Page.
Another question, Is it possible that the only elements affected by the page break is the table only? Anything printed after the table should not be affected by the page break.
This is also possible and again it all depends on the finished design. One common option is to put everything, that is underneath where you want the table to break and overflow, on a Master Page. So the Master page for the first page (assuming this is where the table is) should have a bottom margin big enough to accomodate the content that you need. In this way when the dynamic table reaches that bottom margin, it will automatically break and overflow to the next page and everything that is on the master page will not be affacted by the page break.
I suggest you take a look at the following tutorials: