I have a table that I am forcing to a second page. But, when the table is empty, I want to not only hide the table, but suppress the extra page.
At this point, I can hide the table, but not suppress the extra page.
How might I go about doing this?
I have a table that I am forcing to a second page. But, when the table is empty, I want to not only hide the table, but suppress the extra page.
At this point, I can hide the table, but not suppress the extra page.
How might I go about doing this?
Hello Compsey,
How are you forcing your table to a second page? Please detail your answer.
How did you hide the table? Are you using a script or the wizard?
Best regards
Luciano Machado
Thanks for the reply Luciano.
To force my table to a second page, I edited my style sheet creating a class called .pagebreak.
I used Connects “Edit Rule” and under formats->Breaks, I have the following settings:
Before: always
Inside: auto
After: auto
Widows: 0
Orphans: 0
To hide the table, I am using the hide() function inside a script that says if the table has no elements, hide the <div> the table is inside.
Thank you,
Blaine
Hello Blaine,
It is hard to tell exactly what is happening in this case, without see whole context of your configuration. But you can create a script to load your table if it is not empty using:
function add(value, operation) {
if (value === undefined || value === “”)
return;
operation(value);
}
var result = “”;
if(!(record.fields[“ID”] == ‘’))
{
add(record.fields[“ID”], function (value) { result += ’ Contents of table '; });
}
results.html(result);
Maybe its will work better for you
If any of this still seems confusing, I suggest you to open a support call with us so we can better assist you and understand your situation more clearly.
You can either go to Document composition and automation | Upland Objectif Lune and click on ‘‘report an issue’’ or you can call us at 1-866-348-5863.
Regards
Luciano
Lets simplify this as your suggestion is not really working for me.
I have a detail table in which I want to hide if it has no records. I have a class which forces a pagebreak. However, I always end up with an extra page if the table is empty.Here is the code for my table and the subsequent script to hide the table:
Table
<table id=“table_8” class=“pagebreak” data-detail=“Table 80” title=“Table 80” data-column-resize=“”
style=“position: inherit; top: auto; left: auto;” offset-x=“37.79999923706055” offset-y=“204” anchor=“page_media_1”>
<thead>
<tr>
<td class=“Field3” colspan=“2” style=“width: 100%; font-family: Times New Roman; font-size: 9.5pt; height: 0.025in; vertical-align: top; padding: 0px;”>
@recchar@
</td>
</tr>
<tr>
<td class=“Field3” colspan=“2” style=“font-family: Times New Roman; font-size: 9.5pt; width: auto; height: 0.025in; vertical-align: top; padding: 0px;”>
</td>
</tr>
</thead>
<tbody>
<tr data-repeat=“”>
<td class=“data Field3” style=“font-size: 9.5pt; font-family: Times New Roman; width: 1in; height: 0.025in; vertical-align: top; padding: 0px;”>
@F1@
</td>
<td class=“data Field4” style=“font-family: Times New Roman; font-size: 9.5pt; height: 0.025in; vertical-align: top; padding: 0px;”>
@F2@
</td>
</tr>
</tbody>
</table>
Script
{
function add(value, operation) {
if (value === undefined || value === “”)
return;
operation(value);
}
var result = "";
if (!record.tables["Table 80"]){
}else{
add(record.tables["Table 80"], function (value) { result += value; });
results.html(result);
}
}