Prerequisites
The Pagination module is required to for container functionality.
Sample Data
A sample workspace and document is provided and relates to the example below. Import the data source using the File->New->EasyCatalog Panel->Import Data Source… menu option. This contains a simple tabular field formed with HTML content:
1 2 3 4 5 6 7 | <table> <tr><th>Material</th><th>T. máx. (ºC)</th><th>Aplicaciones</th></tr></thead><tbody><tr><td>Metal/Metal</td><td>>250</td><td>Altas temp./Baja estanqueidad</td></tr> <tr><td>EPDM (E)</td><td>120</td><td>Ácidos y aceites no minerales</td></tr><tr><td>NBR (N)</td><td>120</td><td>Hidrocarburos, aceites y grasas</td></tr> <tr><td>FKM-FPM (V)</td><td>200</td><td>Servicio químico/Altas temp.</td></tr> <tr><td>VMQ (S)</td><td>250</td><td>Industria alimentaria/Altas temp.</td></tr> <tr><td>PTFE (T)</td><td>250</td><td>Resistente a corrosión</td></tr> </table> |
The sample document contains a series of Formatting Fules for each component of the table when it splits.
Benefits of Using Containers
One benefit is the ability to split Tabular Fields. Normally, these are populated once in their entirety, so cell merging happens on the entire table. Using Containers, you have the ability to control both when a table splits and how it appears in each part of the split. It’s important the Type of Formatting Rule placed is set to Fill and Repeat in the Containers section of the Edit Rule dialog.
Methods to Use
There are various ways to handle population of Tabular Fields inside Containers:
1. “Reuse Existing Table”
Table->Table Options on the data panels pop-out menu is used to assign how and what fills the table. Cells in the table are filled to match cells in the tabular field. One advantage to this method is cell merging attributes can be applied in the normal way to sections of the table. In the sample data standard table is setup as the ‘base’ Formatting Rule.
Now place this inside a container and populate it with the first record:
When editing the Formatting Rule, you can see 3 variants of standard table:
First, Regular and Last options have been defined to indicate which Formatting Rule to use in various split situations. First is used the first time it splits, Regular is for when both ends split. Last is used for the final split.
Now if you resize the frame and thread in new containers, you can see these being applied. Notice the “Continues in Next Frame” and “Continues From Previous Frame” table headers and footer rows:
2. Use a Hybrid Table
Normal tables can mixed with tabular field content. The example below is a regular table with no Table Options applied. It populates vertically by default with one body row for each record. Notice it contains field specifiers for regular and tabular fields:
The field specifiers in this case pick out the first and last column from the tabular field. To do this insert a field from any column in the table, then use ‘convert to field specifiers’. These fields than contain a ‘Computed Field’ command that can be used to identify the column the data should come from.
After assigning this rule to a container and populating it with both records, we end up with:
You can use the same splitting rules described above when populating in this way.
3. Once Per Field Value
When a formatting rule is set to populate Once Per Field Value, it will be repeated once for each row in the tabular field, as can be seen in the Repeating Part formatting rule and result when populated with both records:
If you want to separate each record you can combine a container with there repeating part with another frame like so:
When this is placed in another container the result it:
It’s also possible to combine this method with multi-part fields. Further information on these can be found here.