Skip navigation
MF321
Currently Being Moderated

Allow a break in a form via JavaSkript

Mar 30, 2011 7:19 AM

Hi all,

 

I have got a problem regarding breaks in a form. I concentrate data in SAP with ABAP in a table (several pages). And some parts of the table should't be broken in the form (at the end of the page). In ABAP I build a flag to query that via JavaSkript (in the layout).

 

If flag = X --> the rows can be broken at the end of the page 

If flag = ' ' --> the rows shouldn't be broken at the end of the page --> this rows should be located on the next page

 

How can I solve it with JavaSkript?

 

Thank you for your efforts.

 
Replies
  • Currently Being Moderated
    Mar 30, 2011 7:40 AM   in reply to MF321

    On the pagination tab there is a section where you can program a conditional break .....this will tell the program when to break and when not to .....I do not think that you will be able to pragramatically set the allow break in content flag.

     

    There is also the widow amd orphan controls that will allow you to keep certain objects together but again this woudl be for the whole document and not dynamically set like you are asking

     

    I do not think you will be able to do what you are asking

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 30, 2011 8:15 AM   in reply to pguerett

    This actually works, athough I'm not sure if it's "best practice":

     

    Assuming the rows are bound to data, in the initialize event of your table add the following:

     

    if (flag == 'X')

        this.keep.intact = 'none';

    else

        this.keep.intact = 'contentArea';

    xfa.layout.relayout();

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2011 6:20 AM   in reply to MF321

    Is it possible for you to share the form with us?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2011 6:38 AM   in reply to MF321

    I've sent you a private email with an address to send the form.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2011 7:07 AM   in reply to MF321

    I understand.  Can you describe the structure of the form section in a little more detail?  What object is repeating, and how is it contained?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2011 10:25 AM   in reply to MF321

    I have a working example that is similar to your layout.  Let me know where to send it to.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points