cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional page break with multiple conditions

Former Member
0 Kudos

Hi,

have not found anything in the forum, so i hope its not a repost.

I print a table and need a pagebreak before every new record.

That sounds easy, so I used:

Report.KeyfigureDetails.Container.KFUID ne Report.KeyfigureDetails.Container[-1].KFUID

Its works well BUT it does not inserts a page break BEFORE the very first record even if I say its "before" and "top of next page".

So I used:

(Report.KeyfigureDetails.Container.KFUID ne Report.KeyfigureDetails.Container[-1].KFUID) or 
(exists(Report.KeyfigureDetails.Container[-1].KFUID) = 0)

Result: No pagebreak at all. There must be a error inside my statement.

I used two conditions. one with

Report.KeyfigureDetails.Container.KFUID ne Report.KeyfigureDetails.Container[-1].KFUID

and one with

exists(Report.KeyfigureDetails.Container[-1].KFUID) = 0

But again no pagebreak BEFORE the very first line.

What am I doing wrong? I just want to have a break before every record, even the first one.

I am using formcalc. If a conditional pagebreak in java does not need the form to be interactive/dynamic such a solution would be appreciated as well. I just want the form to be 100% static to avoid additional licenses.

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

solved it.

Former Member
0 Kudos

Eddie,

it's customary to include how you solved the issue in case someone else comes across the same problem

Former Member
0 Kudos

Oh sorry! But you are totally right.

The problem was, that FormCalc did not inserted the correct structure of the object.

The structure was like: subform1.subform2.subform3.object.

FormCalc just inserted: subform1.object

Writing the code manually made the system at least to perform the page break after the first record.

The page break before the first record could somehow not be solved by me with:

exists(Report.KeyfigureDetails.Container[-1].KFUID) = "0"

I then remembered Otto Gold's recommendation to use Java as it is more powerful. And in deed Otto gave me the solution by his comment.

As a final solution i use two different conditional breaks.

The fist to perform the break before the first record:

this.resolveNode("Container[-1].KFUID") == null

The second to perform the page break after each new "KFUID":

if (this.resolveNode("Container[-1].KFUID") != null) { this.resolveNode("Container[-1].KFUID").rawValue != Container.KFUID.rawValue }

Maybe a smart Java guy like Otto Gold can put those two conditions into one

I was not, but these two solved my problem.

I dont say that FormCalc is not able to solve the problem as well. But I have very limited knowledge about the Adobe forms and at the moment I have no time to dig deeper into this.

Former Member
0 Kudos

Hi Eddie,

I am trying to understand the conditional break in order to satisfy the following requirement.

I got a dynamic table and the a subform. I need to continue the table rows in a next page after I displayed 5 rows. I supose that the conditional braks may help but I am not sure now.

Could you please give me some guidelines. I got another thread in order to give points

Regards,

Orlando Covault