How to remove item header on the last page

Hi,
We have an adobe form where, on the last page a BIG footer gets displayed.
Now if the number of line items are not enough, they wont go till the last page, but the last would still be printed with no line items, just to accomodate the huge footer that we want to be displayed only on the last page.
Now in doing this, we want that if there are no line items on the last page, the item header should not be displayed. We are not sure how do we do this.
The same is accomplished in SAP Script, and there they are using WRITE_FORM with type DELETE. So anything that prints after that even on a new page, the item header wont get printed.
Please suggest how do we do this in Adobe Forms.
Thanks,
Tirth

Hi Mate,
there is a contradiction then.
in table header rows definition, we specify show header in subsequent pages, then the header appears only if there are items displayed on that page. in your case the table header shouldn't be displayed then please check why its comming out there...?
well in any case if you want the script it would be like below on layout ready event of the header row.
// run the below script in last page
if(xfa.layout.page(this) == xfa.layout.pageCount()){
var pageSFList = xfa.layout.pageContent(xfa.layout.page(this) - 1, "subform", false);
var pageTotal = 0;
// for each subform named <Item>, which is the data row of the table
for (var i = 0; i < pageSFList.length; i++)
     var sf = pageSFList.item(i);
        if(sf.name == "headerrow"){ // if header row is found then chec is data row is visible and set its presence accordingly
           if(sf.parent.item.presence == "hidden"){
               sf.presence = "hidden";
     if (sf.name == "Item") // if data row itself is found set its presence accordingly
       sf.parent.headerrow.presence = "visible";
you might need to tweak the code according to your element names.
hope this helps,
Cheers,
Sai

Similar Messages

  • How to remove links pointing to the same page?

    I have PDF documents with Links which point to sections referenced (e.g. link of text "Section 2.2" points to the actual page number of "Section 2.2"), but as the links are created from cross-references during rendition from Word to PDF, there are cases that the destination page number and source page number of the links are the same (e.g. links of text "Section 2.2" on page 9 are created with the destination of page 9 which is the actual page number of "Section 2.2"), I want to remove all these links, but I don't know how to get the destination page, I check the API reference and find that "PDLinkAnnotGetAction" may work , but I don't know how to use it, could you check me codes below and advise ? Your help is really appreciated!
    PDPage page;
    ASInt32 i,i2;
    AVDoc avDoc = AVAppGetActiveDoc();
    PDDoc pdDoc = AVDocGetPDDoc (avDoc);
    int pageNum = PDDocGetNumPages(pdDoc);
    for (i = pageNum - 1; i >= 0; i--)
    page = PDDocAcquirePage(pdDoc, i);
    int annotNum = PDPageGetNumAnnots(page);
    for (i2 = annotNum - 1; i2 >= 0; i2--)
      if...
      PDPageRemoveAnnot(i, i2);
    My Product Information:
    Acrobat Pro 8.1.6, Windows

    Start by reading the PDF standard (ISO 32000-1) to understand Actions vs. Destinations.
    Then for each annot, you'll want to see which it has (and in the case of an Action, if it has more than one).  Then you need to parse the action or dest to see what it is and where it goes.  If you don't like it, then you'll delete it.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Tue, 25 Oct 2011 09:25:32 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: How to remove links pointing to the same page?
    How to remove links pointing to the same page?
    created by OALD<http://forums.adobe.com/people/OALD> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3989576#3989576

  • How to print a label in the last page of the report

    Hi, I have a report af bottom page I trid to put a label, the label is in the margin, but when I change the print condition send me a error, illegal print condition, how can I print this label only in the last page at the botton of the page
    Thanks

    Herbe,
    You can do this using format trigger
    Please see the building reports manual / Tutorial for details
    at http://otn.oracle.com/docs/products/reports/content.html
    Thanks
    The Oracle Reports team

  • How to print a field on the last page of Smartform?

    HI FRIENDS,
    I NEED TO PRINT ONLY ONE FIELD IN LAST PAGE OF FORM SMARTFORM
    HOW DO I CHECK last page. I tried WITH THE FIELDS OF TABLE
    SYSF BUT NOT worked.
    Thank you.
    ROGERIO VAZ

    Hi,
    Goto the conditions tab of that window and enable the check box for Only after the end of main window.
    This will surely print your field in the last page.
    try this and get back to me if any issues.
    Regards,
    Anand.

  • How to print a field on the last page of Smartform with more  of 2 pages?

    HI FRIENDS,
    I NEED TO PRINT ONLY ONE FIELD IN LAST PAGE OF FORM SMARTFORM
    HOW DO I CHECK last page. I tried WITH THE FIELDS OF TABLE
    SFSY BUT NOT worked.      
    The form has  more of  2 pages.
    Thank you.
    ROGERIO VAZ

    Hi ,
    You dont have to hard code anything to achieve this functionality,
    just create a window and in that window define a text element to print
    that variable.In the conditions tab of that window check the check box
    "only after end of main window".i think you might have used a main window,
    so irrespective of the no of pages the smartform prints,it always displays that
    field in the last page of the smartform.
    regards,
    srikanth.

  • SAPSCRIPT how to place item header on next page

    Hi Guys
    The situation iam facing is this
    outside the loop i have printed the item header then iam looping on an internal table which is printing all the items.
    When the o/p is one page this works fine but when the o/p is more than one page the item header on the next page dosent get printed because its outside the loop.
    somewhat like this
    perform print_header.
    loop at itab.
    perform print_item.
    endloop.
    Question is how can i place the item header text element in my sapscript so that it prints automatically before the start of the items on every page?
    Thanks

    Use the following in Text Editor on Script form.
    :/ TOP
    Print the Item header.
    :/ENDTOP.
    Or.
    Use a variable window. To print the header
    So it will come for every new Page.
    Or.
    Define &CURRENT PAGE&
    IF &PAGE& NE &CURRENT PAGE&
    PRINT HEADER
    ENDIF
    &CURRENT PAGE& = &PAGE&
    Hope this resolves your issue.
    Regards,
    Gurpreet

  • How to write a subform @ bottom of last page without reserving space for it

    Hello gurus,
    I have a small challenge for you guys :-):
    Iu2019m developing an adobe print form for an invoice and have to write a subform at the bottom of the page but only if it is the last page. Said like this the requirement doesnu2019t seem so special at all which I agree with you but, if add to the problem that I must not reserve a place (on master page) to it so I can minimize the paper loss and use the maximum space of the page for the invoice items/taxes etc (for the container) and only write the subform at bottom if it is available space left it turns the problem a little bit more complex, isnu2019t? If case there isnu2019t available space in the u201Ccurrentu201D last page to write it I should provoke a page-break to write it at bottom of the u201Crealu201D last page.
    Iu2019ve tried to put the subform on the master pages (FIRST and NEXT) overlapping the end of the correspondent containers and hide it for all the pages that werenu2019t the last one but in some cases the subform content is overlapping the invoice items.
    Do you have any suggestions how to achieve this?
    Thanks in advance.
    Regards,
    Alexandre

    I don´t have a working demo of that two master pages approach. Was just an idea and I wanted to know if it works.
    But I have one more, less experimental idea, which I have implemented some time back and am sure, it works.
    Follow me:
    - fill the data into the table (done automatically, of course, but a must for the event to work = pick event after you got the data into the table...) (not a real work)
    - count the number of lines (easy, piece of cake)
    - get the height of one row (easy, piece of cake)
    - compute how many pages are occupied by the table lines
    - compute how many lines are present on the last page
    - compute how many lines are needed to make the last page "full"
    - use the last number to compute a height of a blank subform (no content but has size), set the height, which will make the "footer" (the one we are talking about here) go to the bottom of the page
    Every needed reference is here:
    http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_basics.pdf
    http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
    Especially the last chapter of the JS reference.
    Regards Otto

  • In Pages '09, how do I remove the header from the first page of the document in a page layout document?

    Working Pages '09, I am trying to set up a multi-page document using page layout  (not a word processing document, because I'll be using lots of graphics and text boxes), with headers and footers, but no header on the first page, as this will be the title page. The layout>section pane has the 'First page is different' option  greyed out (because it's a word processor only option). Help tells me that each page is it's own section in page layout, but there is no way to have one page without a header and all the others with, as far as I can tell. Am I completely missing something or is there a way around this?
    Also, I want to do this again for additional chapters in the document (or else, I believe, be forced to manually start page numbering for each chapter in a new document).
    Cheers.

    Hi, Barry. I don't know why this solution didn't work for me :-\ Does it matter that my page numbers are in the footer and not the header? When I follow your direction, the pages do get numbered differently. My problem occurs with the last step.
    1. Open the Inspector. (Check!)
    2. Click the Layout button (second from left). (Check!)
    3. Click Section. (Check!)
    4. Make the two settings shown: (Check!)
    5. Go to Page 1 and delete the contents of the Header. (When I do this, the content for all footers is deleted...)
    I really appreciate your insight.

  • How to print in the last page of the script..?

    Hi,
    I am working on a script. I have a header window and one main window. In the main window, I am printing the line items of the Invoice. Once the line items finish, I have to print the sub totals there. and also to print the company agreement details(around 10 lines of text) in the last page of the script.
    So, <b>how to print the agreement details in the last page of the script..?</b>
    Can anyone provide me a sample code to find the last page of the Script layout..?
    And regarding writing the agreement details, is it better to hard code the text or use the standard texts..? which one is better..?
    Regards,
    Paddu.

    HI,
      Just create a Standard text, if you are going to use this standard text in other layouts also... and use it otherwise you can hard code it as this its of only 10 lines.
    declare one more element in the  main window itselft and call it atlast it would print in the last page..
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'FOOTER'<b><- This element should contain the agreement details</b>
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    ELEMENT = 1.
    Thanks
    Mahesh

  • Avoid printing Header and Footer in the last page

    Hi,
    Could anyone please let me know how to avoid print the header and footer in the last page?
    Note: I'm printing RTF template for publishing the output.
    Looking forward for your valuable inputs/suggestions.
    Thanks in advance,
    Regards,
    Muru

    Hai,
    My report got FROM PO & TO PO parameters and i need to print footer only in first page of each PO. Tried with section but now i am getting first page of all PO contionious and then all lines together.
    Please call me or sent replies to [email protected]

  • How to Print T&C on backside of the last page in smartform.

    Hi All,
             I have requirement from one of the my client to print the terms & condition page on the back side of last page in invoice form.
    I have created three pages as below.
    First page: To Print header data,Print mode:blank,Next page : NEXT.
    Second page : Contains the continuation of the data,if there are enough lines,Print Mode: D,Next page : NEXT.
    Last page:To Print T&C,Print mode : blank,Next page :blank.
                This is working properly when form has 2 pages.Here my question is,
    How to print the T&C on backside of first page,if form has only one page.
    Thanks in Advance.

    Hi Vineesh,
    I have 3 pages in my form.
    First page: To Print header data, Print mode:blank, Next page : NEXT.
                         First page has the comment node, go to next page as Third page.
    Second page : Contains the continuation of the data, if there are enough lines, Print Mode: D,
                          Next page : NEXT.
    Third Page: T&C page, Print mode : blank,Next page :blank
    The 3rd page should print back side of the page.
    If form has only one page,then first page should be in D mode.Hence the T&C page will print back side of first page.
    If form has multiple pages. then the last page ( where the main window gets end ) should be D.Hence
    the T&C page will print back side of last page.
    How to achieve this both the scenarios?
    Thanks & Regards,
    Priya Chandran

  • How to remove blank lines in the end of list .

    hi,
    in a complex report ,when there are only 20 pages,and linecount is 65(2) ,in the last page only 27 lines are filled and data is completed.then blank lines are printing from 27th line to 63 line.then end of page is triggering.
    so plz help me how to remove the blank lines here and immediately print the endof page.

    Hi,
    will this work for you.
    SET BLANK LINES OFF.
    These statements allow you to specify whether you want to output blank lines or not. Use SET BLANK LINES ON to output blank lines or SET BLANK LINES OFF to suppress them.
    Regards
    Viswanath Babu

  • How do I determine whether the current page in Forms is the last page.

    I have a requirement of printing amount in words using SPELL_AMOUNT Funtion Module, in SAP Scripts.
    When I have only one Item Line, I am able to successfully, print the amount.
    The moment i have line items pouring to the next page, I see that the I am unable to retrieve the spelled amount from the Function Module.
    I think may be i need to find out if the current page is the last page, and if it is so, print the amount on the last page, .i.e., the page where the item lines have overflowed to. How do i find this out.
    Can anybody, suggest something.
    Regards,
    Owais...

    I wonder if you could do something like this.  Wrap your logic with this IF statement.
    /: IF &PAGE& = &SAPSCRIPT-FORMPAGES&
    /: ENDIF
    Regards,
    Rich Heilman

  • How can I have a standard text block appear on the last page of my documents?

    How can I have a standard text block appear on the last page of my documents without having to type it in all the time? I have a terms statement with a line for a customer’s signature which I want on the last page of my invoices and right now I have to type it in each time or cut and paste it from a previous invoice. I already have a Master Page that includes the customer information and my company information at the top of each page and I am using data merge to fill each page with the items ordered and their pictures etc. I would just like to have this standard terms block automatically show up on the last page after the last item in the data merge.
    Thank you all in advance for your help.

    Thank you Peter. This works. I have the text block now at the bottom of a second master page which I apply to the last page. For aesthetics I can modify the position of the text block in the new master page to bring it up from the bottom under the last item ordered when there is less than 4 items on the page. (my data merge fits up to 4 items with their images on a page).  If the last page is full I’ll insert a final page using the second master and also bring it up to the top of the page.

  • How to print grandtotal in table footer only in the last page in SMARTFORMS

    Hello Experts,
    How do I print the GRANDTOTAL in the table footer only on the LAST PAGE in SMARTFORMS.
    What I have done is in the text element of CELL1 of the table footer i wrote the folowing logic but not working.
    /: IF &SFSY-PAGE& EQ &SFSY-FORMPAGES&.
    * V_SUM.
    /: ENDIF.
    I even tried this.
    /: IF &NEXT-PAGE& EQ 0.
    * V_SUM.
    /: ENDIF.
    but still it displays the grand total on all pages at table footer.
    How do i go for this experts.
    Regards,
    Ranjith N

    HI Nambiar,
    To print the grand total only on the last page then create the secondary window --> create the text node for the grand total -->In the condition tab check only after the end of the main window.
    This grand total will be displayed after all the items and end of the main window.
    Footer in the table displays as the subtotals i.e on every page total is displayed..
    Regards,
    Sravanthi

Maybe you are looking for

  • Sub total wise Grand total in ALV report

    Dear All, I am displaying a list of material through material group wise so for each material i want to display sub-total for stock and grand total of stock(material group wise).Here it is adding up all the stock displayed for different AUOM(alternat

  • Why is the sound of my new ipad cutting out intermittently and what does Apple recommend to solve the problem in lieu of any updates?

    Why is the sound of my new ipad cutting out intermittently and what does Apple recommend to solve the problem in lieu of any updates? All of a sudden without changing any settings, the audio on my NEW ipad cuts in and out on applications/ games, keyp

  • Temperature for kt4 6590 S.O.S

    I have problems with the temperature of the CPU.   I have a XP2000 that would have to go at 1665mhz for defect and alone I can put it since at 1600mhz if it is not to without he/she warms a lot and the system is restarted alone.   do you recommend me

  • I just bought the ox mountain lion and i cant download it!!

    i just bought the ox mountain lion and i cant download it!! Dear Moh Nasser, Your Apple ID was just used to purchase OS X Mountain Lion from the Mac App Store on a computer or device that had not previously been associated with that Apple ID. You may

  • How do I get my CS2 PREMIUM?

    Here's my problem: I have the Adobe CS2 Production PREMIUM. I had to uninstall it because of a virus. I tried to re-install it from the discs but I can no longer install from the discs - so I called the phone # and was sent here -  https://www.adobe.