Community

Single occurence Table data which flows across next page

Hi ,

In my pdf document, there are multiple tables come under different section. For some documents, the table’s rows can flow to next page.

If a table is continued on next page the Heading will be changed as Table Heading (continued)
(e-g)
If Events is a heading of the table , it’s heading will be changed Events (continued)

I am using Repeatable Group with “kwLables” as shown in attached pic. I have assigned appropriate labels in Found elements as column name in Table->Columns->Properties also.

Please guide me what I have to do/check further if the table has to be recognized for next page also.

Was this article helpful?

0 out of 0 found this helpful

Comments

16 comments

  • Avatar
    Vladislav Suvorov
    Hello,

    Sadly, I could not reproduce the issue. However based on your screenshots I made a sample project, see it attached. Please see the main logic and check what elements are not found on the 2nd page of the document in your current solution. If you cannot figure this out, then share the following screenshots:
    1. Search areas of all elements that should be found but aren't.
    2. Advanced tabs (for those elements which have any resctrictions specified there)

    Regards,
    Vladislav
    0
  • Avatar
    kawrthik
    Hi Vladislav,

    Your project was helpful. But again detecting the header was an issue. I included code like below in the advanced tab of table element (in pre-search relation)

    Let x = Rect(rgrTable2.AllInstances.kwDate.Rect.Left,rgrTa ble2.AllInstances.kwDate.Rect.Top,rgrTable2.AllIns tances.kwEvent.Rect.Right,rgrTable2.AllInstances.k wEvent.Rect.Bottom);
    HeaderSearchArea(x);

    It worked. but it captures incliding the header as row.
    I've set "Detect rows autometically" and checked the "One line of text corresponds to one row" in Rows tab.

    And the repeating table rows in next page is not getting captured during verification.

    Please find attached the screen shot below
    0
  • Avatar
    Vladislav Suvorov
    Hello again kawrthik,

    The issue you are running into is your table is likely outside of repeating group in Blocks section. It doesn't matter if your table in Blocks has a Has repeating instances checkmark selected.
    To solve that please make a repeating group in Blocks and place your table there. Deselect Has repeating instances checkmark if needed.

    Hope that helps,
    Vladislav
    0
  • Avatar
    kawrthik
    Thanks Vladislav. Unfortunately the trial has expired. Let me check once we get it extended.
    0
  • Avatar
    kawrthik
    Hi Vladislav, back again.
    I did placed the table block inside the repeating group. But still the same result. But the header contains two rows now. Please find the attachment and guide me.
    0
  • Avatar
    Katja Ovcharova
    Hello kawrthik,

    Please try adding
    AutoDetectTopAndBottom( false );
    to the Advanced pre-search relations for the tbl element.

    If this does not help, then please share your FLS project with the batch containing at least one document that demonstrates the issue.
    0
  • Avatar
    kawrthik
    Hi Katja,

    Thanks for your response. I tried adding AutoDetectTopAndBottom( false );
    but the same issue persists. Let me discuss with our management regarding sharing the project.
    0
  • Avatar
    Katja Ovcharova
    Hello kawrtnik,

    I would like to add that in your Advanced pre-search code you are currently referencing rgrTable2.AllInstances.*. It seems more reasonable to use rgrTable2.CurrentInstance to look for the corresponding element.

    Besides, as the table header captures one extra row, then probably header search region is too small, so you can try inflating it e.g. as follows:
    Rect R = rgrTable2.CurrentInstance.kwDate.Rect Or
    rgrTable2.CurrentInstance.kwTime.Rect Or rgrTable2.CurrentInstance.kwEvent.Rect;
    R.Inflate ( 5dt, 5dt );
    HeaderSearchArea (R);
    You can try other values within the Inflate() call to achieve the acceptable result.

    If suggestions above do not help, then please share the FLS project and sample document(s).

    0
  • Avatar
    kawrthik
    Hi Katja,

    Both rgrTable2.CurrentInstance.* and Inflate() method did the magic.

    But the total width of table has now shrunk (attached screenshots)



    Is there any way to increase the width of table or the 3rd column width only ?

    Or any other simple/Advanced way ?

    Below is the Advanced pre-search code

    IgnoreHorizontalSeparators();
    Let r = Rect(rgrTable2.CurrentInstance.kwDate.Rect.Left,rg rTable2.CurrentInstance.kwDate.Rect.Top,rgrTable2. CurrentInstance.kwEvent.Rect.Right,rgrTable2.Curre ntInstance.kwEvent.Rect.Bottom);
    r.Inflate ( 90dt, 51dt );
    HeaderSearchArea(r);


    If I am not using IgnoreHorizontalSeparators(); the last row recognition of the table is skipped. (shown below)


    If I am using IgnoreHorizontalSeparators(), the export result contains no rows. (shown below)



    Please suggest a way so that no row is skipped; during export rows will render as rows only.

    Thanks in advance
    0
  • Avatar
    Vladislav Suvorov
    Back here as well,

    First off please make next corrections:
    1)Please try taking your table out of repeating group
    2)and then make all columns refer to LastFound instance of header keywords elements which stay in repeating group. (It is found in table element properties->Columns->properties of selected table block - there is a drop down list for that).
    3)Remove Date from master columns that are used to detect rows.
    4)Please don't inflate header search area by that much. 182dt in width and 100dt in height make a real difference.
    5)Can't say anything about width of table being inappropriate without seeing the project itself. I agree with Katja that it would make the whole process a lot easier.

    Also here is a FlexiLayout help path for more information if needed: Tutorial > Sample 4 > Step 8: Table element, InvoiceTable element

    Hope that helps in some way,
    Vladislav
    0
  • Avatar
    Katja Ovcharova
    Hi,

    as we can see from the screenshots, the table body is shrunk according to the found header. To avoid this you can use one of the following variants:
    1. Use ExactColumBorders and specify wider region for the Event column;
    2. Add Region element to the right of kwEvent and specify its size e.g. as follows
    Rect R = kwEvent.Rect;
    R.Right: R.Right + 300dt;
    RestrictSearchArea: R;
    If kwEvent.IsNull Then DontFind;

    3. In the rgrTable2 Advanced pre-search use this region instead of kwEvent to define the HeaderSearchArea and do
    R.Inflate ( 500dt, 5dt ); (horizontally the region can reach page left and right borders).

    As to the lost row or all rows captured as one - try specifying only Time and Event as master columns to detect rows. Then even with IgnoreHorizontalSeparators rows should be divided properly. On the last screenshot only one entry for Date was found, and as Date appears the first in master columns list, rows were detected according to this single entry.
    0
  • Avatar
    kawrthik
    Hi Katja, my PC got crashed. Working in different system temporarily. Will share the project files once it is back.
    0
  • Avatar
    kawrthik
    Hi Katja,

    Please find the attached project and guide me what is the best way to handle such type of documents.
    0
  • Avatar
    kawrthik
    Hi,

    as we can see from the screenshots, the table body is shrunk according to the found header. To avoid this you can use one of the following variants:
    1. Use ExactColumBorders and specify wider region for the Event column;
    2. Add Region element to the right of kwEvent and specify its size e.g. as follows
    Rect R = kwEvent.Rect;
    R.Right: R.Right + 300dt;
    RestrictSearchArea: R;
    If kwEvent.IsNull Then DontFind;

    3. In the rgrTable2 Advanced pre-search use this region instead of kwEvent to define the HeaderSearchArea and do
    R.Inflate ( 500dt, 5dt ); (horizontally the region can reach page left and right borders).

    As to the lost row or all rows captured as one - try specifying only Time and Event as master columns to detect rows. Then even with IgnoreHorizontalSeparators rows should be divided properly. On the last screenshot only one entry for Date was found, and as Date appears the first in master columns list, rows were detected according to this single entry.


    Hi Katja,

    I tried the above and re-attached the project. I am stuck with the table width expansion (esp. Event column width expansion). Please look into the project and share your idea.
    0
  • Avatar
    Vladislav Suvorov
    Hello kawrthik,

    I took your project, made two changes: uncommented inflation in EventSpacer Advanced tab and changed Event column reference element to it(Table->Properties->Columns->Choose a necessary column->Click properties and choose a reference element there):
    1)No rows are skipped
    2)Header isn't being captured into table body (please see paragraph below).
    3)Event column now contains all text but contains header value as well. However when exported to .afl and loaded into FlexiCapture it doesn't actually show up in the table body so no unwanted info is captured.

    Hope that helps,
    Vladislav
    0
  • Avatar
    kawrthik
    Hi Vladislav,

    I did the same changes you suggested. Also I commented the ExactColumBorders() line
    It worked as expected and exported well also.

    But the exported tables results into two excel documents based on the page.
    Can this be merged into one excel document ( since it belongs to one patient) ?


    Thank you people ( Vladislav and Katja) for your help.
    0

Please sign in to leave a comment.