cancel
Showing results for 
Search instead for 
Did you mean: 

Flowed Subform on subsequent pages not resizing

Former Member
0 Kudos

Hi Experts,

The image underneath illustrates my problem:

I have a table element on my form and the header of that table is the header (3lines with on every line a single textfield) of every page in case of overflow.

If the value of the textfield on line 2 is empty it should be hidden and the blank line should be hidden.

To achieve this, I've created a flowed top to bottom layout and I've written JavaScript coding to hide the field when its NULL.

When I have a form which consists of 2 pages, the header of the first page scales correctly (Line 2 is hidden and does not reserve any space).

However on the next page (or subsequal pages), Line 2 is hidden since the caption of the textfield is not displayed, BUT the space is still reserved and the header is not resized.

Any of you have an idea how to solve this?

Thanks in advance for your help.

Kind regards,

Niels De Greef

Accepted Solutions (0)

Answers (1)

Answers (1)

pavan_prabhu
Active Participant
0 Kudos

Hello Niels,

     In which event you have written the JavaScript? Initialize event OR Layout Ready event?

Former Member
0 Kudos

Hi Pavan,

Thanks for your reply.

I've tried both with no success.

But I don't think the problem is hiding the textfield, it's hidden because the caption is not visible.
The problem is that the subform is not shrinking when this field is hidden.

Kind Regards,

Niels

pavan_prabhu
Active Participant
0 Kudos

Hello Niels,

        

     Yes. I know the problem is not with hiding the field but with shrinking of the sub forms. I asked that question because, in Ready Layout event, even if the field is hidden, the co-ordinates wont change and the sub form won't shrink(as the name suggests the layout is ready and co-ordinates wont change). But in Initialize event, the co-ordinates change and even the sub form shrinks when a field is hidden. But you are telling that you tried both the events but had no success. May be because you have used the Table element. May be I need to check with that and come back to you.

Former Member
0 Kudos

Hi Pavan,

I indeed think that it is caused by using the table event with the repeating header.

It seems that he is hiding the fields correctly but that the layout was already rendered before or something and can't be changed anymore, even if it's a flowed layout.

I'm trying to change the layout with some JavaScript coding (change header size, hide lines, ...) but I can't find a solution..

Kind regards,

Niels

pavan_prabhu
Active Participant
0 Kudos

Hi Niels,

     You can copy the form in a test form. Then try to design the table using only sub forms and not Table element. Then this issue may be resolved.

Former Member
0 Kudos

Hi Pavan,

Thanks for your quick responses.

I tried to change the table element with subforms but now I can't get the header on every subsequent page.

I've made the following layout:

Table

     - Header

               Binding: Reapeat & Min count = 1

     - Body (containing all other fields on form)

               Pagination: Overflow leader = Header

Maybe because in my Body I also have another Table control with repeating header?

Kind regards,

Niels

pavan_prabhu
Active Participant
0 Kudos

Hello Niels,

     You have done the pagination for Body sub form. Instead you should fill the Overflow Leader section in the pagination of Table sub form which is at the parent level.

Former Member
0 Kudos

Hi Pavan,

That's not working either but I don't think this is the solution since the header should be flowed so that the layout can to scale.

Kind regards,

Niels

pavan_prabhu
Active Participant
0 Kudos

Hi Niels,

     I tried in a test form. I think this requirement is not possible since the overflow leader(header) needs to be positioned to get it displayed properly on subsequent pages. You cannot keep the header flowed and get it displayed correctly in subsequent pages.

Refer the link below to know why overflow leader needs to be positioned.

And later if you write the JavaScript on this Positioned header sub form to hide a particular field in it, the sub form won't shrink.

Former Member
0 Kudos

Hi Pavan,

I indeed think that it isn't possible with an overflow leader (header), that's why I tried to achieve it with a table control.

But I think this isn't going to work either.

I tried to bind the lines dynamically with a DATA subform from the data view but in the subsequent pages, he doesn't display the dynamic data.

Same for resizing the header, the first page he resizes correctly, but on the subsequent pages he does not want to resize the header.

Thanks for your help.

Kind regards,

Niels