on 05-26-2016 9:16 AM
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 !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prajesh,
When we have three header rows, the check box Include Header row in Subseqeuent Pages can be selected for only one header. When we check all three, system deselects the check box on remaining two headers. Hence probably as per above screen shots, only one header went to next page.
So, I have already tried the above thing by wrapping the three header rows in a table section, and in that the selected check box "Include header rows on all pages". Rest all settings are similar to what you showed, so I get below output from second page onwards, with blank second row.
Whereas on first page, I am getting as below which is also needed from second page onwards
Please advise.
In the First header row, there are some 8 fields which are being displayed.
In Second header row, some six fields which are being displayed.
In Third header row, some three fields which are being displayed.
Now First and Third header rows always need to be passed to all the pages if the Table data overflows.
But in Second header, say first field in it is having blank value, we need to hide the entire Second header row.
When we are hiding second row using Formcalc or Javascript, above situation arises shown in previous screen shots. First page it hides and from second page onwards, blank space comes.
Thanks for your time!
Sorry for late, finally i'm having something for you,
You need one flag variable in your interface.
Set FLAG in Code Initialization of Interface. You can define your logic for setting flag.
Make use of ALTERNATIVE, (in your form)
After creating ALTERNATIVE, drag your table in TRUE and FALSE sections, and set Alternate condition.
Now Go to layout, and drag and drop ALTERNATIVE node from Data View. Two table created on your page.
Now add header rows according your requirements. and wrap them into Section. (Select rows -> right click -> Group as Section)
and check repeat on subsequent page and initial page
Set Content type of sub-form ALTERNATIVE, TRUE and FALSE to Flowed.
Set Overflow of sub-form ALTERNATIVE to Go To Page 1.
If flag = 0 it display 1st table with two headers, else 2nd with three headers.
Hope this helps.
Hi Dolly,
as per my understanding of your requirement.
you would like to print one table with 3 header and one body. 1st and 3rd header will be visible on every page if it flow to next page but 2nd header will be visible or invisible based on some value.
while you are using 3 different header row in next page if you are hiding based on condition then some blank space are printing.
to avoid this i will suggest you to create one header row inside that create one subform inside that subform again create 3 subform for your header. now you can make 2nd subform based on your value. it it will be invisible then blank space will not print.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did that only , it worked on first page only. Not from second page onwards. Issue I have been facing is from second page onwards. First page was always working fine.
Now I am trying to send the three header rows in table from the code. If I want to hide something, I won't send that row in the internal table. So I am going to handle it from the driver program now.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.