cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding Subform in Table Header at page break

Former Member
0 Kudos

Hello Experts!

I have a very big problem and i hope that anybody of you knows how to solve it.

I have created a dynamic purchase order form for my customer, it is not interactive.

So i created a subform for the header and a subform for the positions of the purchase order. The header subform is divided in three subforms.

One of these sub-subforms is controlled through a mark to set it hidden or visible. This i do through a FormCalc script in the ready:form event.

The header subform is flowed because it contains variable data. Also the position subform is flowed.

To get the header subform on each page after page break, i created a table with a header and only one line. Then i put the header subform into the headerline of the table to repeat it on each page. I put the position subform into the bodyline of the table.

Everything works fine so far.

But when i get an automatic page break, beacause the positions reached the end of the page and go to the next content area, the hidden sub-subform of my header subform in the header line of the table appears. I don´t understand why. It looks like, that the hide command will be ignored.

I tried to hide the sub-subform in the header subform also in the ready:layout event, but this leads to an empty block because the following subform will not be moved up to the empty space. So i think i must find a way to hide the sub-subform between ready:form where the pagebreaks have not been inserted and the ready:layout where the page breakes have been inserted. I also tried at initilization event, but this does also not work.

I also take the other way, that the sub-subform is completely exluded from the layout and only if the mark is set, than set it visible. That also does not work because it would be shown on first page, but after page breake it does not appear.

Does anybody of you have an idea or a solution, how to hide my sub-subform after an automatic page break occures?

Thank you in advanced!

Best regards from germany!

Björn

Accepted Solutions (0)

Answers (1)

Answers (1)

Florian
Active Contributor
0 Kudos

Hi Björn,

first you have to check the options. Make sure, that you set all the necessary flags and check it twice.

IF I understand you right, you just want to have a additional text in the header of your form as long as the first pagebreak comes. That means you want to print a information text or something like that.

can you publish you coding here, and a screen of the tree, where subforms are shown. In my opinion, you might be just doing a little thing wrong. Ready:Form is the correct event, the printing is done, but the positioning still not done at the moment. That sounds good.

Regards

Florian

Former Member
0 Kudos

Hi Florian!

Thank you for your response!

Okay, i will try to describe it a little bit more deeper:

This is my subform structure

This is my layout:

My problem is the following:

I must set up the subform FAUF_ZUSATZINFO visible or hidden, depending on the

field show_addinfo. If for a creditor the flag is set, the subform should appear. If it is not set, the subform should be hidden. In the form:ready event i use this coding:

    if ( $.parent.SHOW_ADDINFO == "X" ) then

$.presence = "visible"

     else

$.presence = "hidden"

    endif


I will show you now the result:

First page, when the show_addinfo flag ist not set

After page break because of overflow of the data:

On the second page, the FAUF_ZUSATZINFO subform appears.


My opionion is, that when i set a subform to hidden, than it should be hidden for the complete form.


Could it be, that there is a problem with having the "FAUF_KOPF_DETAIL" subform, which contains the FAUF_ZUSATZINFO subform, in a header line of a table? Could this be the reason that it does not work. Than i think that could be a bug. But i´m not sure.


Hope this explains the problem in more detai.


Regards


Björn


Florian
Active Contributor
0 Kudos

Ah, Now I see your problem more clear, i check on this and will report. Could take some time

~Florian