Skip to Content
0
May 26, 2016 at 08:16 AM

Hiding a Table Header Row when Multiple Header Rows exists

676 Views

Hi All,

I am facing an issue in a requirement.

We have 3 header rows and then a body row, where these three header rows(with different number of fields )should always be an overflow leader to the body row.

Based on Form calc Script, I have to hide the second header row,

I have used positioned subform for header rows and table data had the above subform has overflow leader. But now I have to hide the second header row if a value in a field in that row is blank. So that the third row takes its place.

With positioned subform this hiding was not possible (since with Java script/Formcalc) it was still leaving blank space

So I created a table with three header rows and one body row and wrote the script as below in the Row2. It works fine on first page and it got hidden and there was no blank space between Row1 and Row3. But from second page onwards, the script was just hiding the text in Row2 header, but blank space for second row is still appearing.

I have tried using formCalc as well as JavaScript

For JavaScript:

if(this.rawValue == null)

{

this.presence = "hidden";

}

For FormCalc:

if ( not HasValue($)) then

$.presence = "hidden"

endif

It is working fine in first page, hidden field is being occupied by subsequent header line.

But second page onwards it's not working as expected, field is being hidden but the space is there.

Please suggest how can I achieve this.

Thank you for your replies in advance !