Using FlexiLayout Studio to Design Data Capture Templates
FlexiLayout: How to capture a table using Repeating Group if table header is on each page
In some cases, we might have a table that we are not able to capture correctly using a traditional method – Table element. In such cases, we usually use Repeating Group element.
But what if we come across a multi-page document that has a table header on each page?
We can use two following methods to capture such a table using the Repeating Groups.
Using Absolute search area constraints
To limit the search area to the table area so that it doesn’t capture unnecessary text outside of the table, we can use Absolute search area constraints in the Search Constraints tab.
You can measure the area with the Measure Rectangle tool.
Using nested Repeating groups
Sometimes it might be not suitable to use the Absolute search area constraints method because other tables using this layout might have different positions and lengths of elements, thus making it not convenient to use the method, because you will have to re-measure the area every single time.
In such a case, you can use the nested Repeating group method.
- Create the first, “main” Repeating group that will include the Table header and footer.
- Next, create the nested RG in the first RG. The relations are as follows:
- These are the main steps, other elements in the RG don’t need any specific settings and should be designed according to the needed results.
How to reliably capture elements in FlexiLayout Studio if the image resolution can vary
When the image resolution varies, then the search area of elements based on absolute offsets can miss the required area. How to reliably capture elements in FlexiLayout Studio in such case?
Instead of the absolute offsets, the relative offsets based on the Height/Width of already found elements should be used if the image resolution varies.
Using absolute relations in dots in FlexiLayout is like that:
However, if the image resolution can be different and absolute size in dots can vary, relative offsets should be used, bound to Heights and Widths of already found elements. In this case the image resolution will not affect the offset, as Width/Heights of element will be changed proportionally.
Relative offsets should be set on the “Advanced” tab in the Advanced pre-search relations area.
If the Advanced relations are used, all simple relations from the Relations tab should be disabled, to avoid any conflicts.
Absolute relations can be rewritten on the Advanced tab as well, just as:
//------------ Above: CharacterString.Bottom + 150dt; //------------
More information about FlexiLayout language that is used to write the code in the Advanced pre-search relations can be found in the online Help article or in the FlexiLayout Studio built-in Help.