Hide a header field depending on page number

Hi and I have a header subform for my form which I am using as a overflow header, but I need to exclude 2 fields for the FIRST PAGE only,  I have used the following formcalc SCRIPT but it does not seem to work... I am new to ADOBE FORMS and scripting... please help!
var curpage = $layout.page ( ref ( $ ))
if ( curpage == 1  ) then
$.presence = "hidden"
endif

In the FO you can not access the page numbers as such for calculations, because the XSLT
runs before the pages are rendered.
Typical work arounds are
1) Differenet page layout for first, last or even/odd numbers with different mark in header/footer.
2) Create document first and use BI Publisher java api's to (a) get number of pages (b) b add mark
after the fact. This has been implemented for a large to be unnamed customer.
Klaus

Similar Messages

  • Can I set up a master page to show custom alternating footer text dependant on page number?

    Hi,
    Is it possible to set up a master page to show different messages in the footer of a brochure dependant on page number? For example;
    Page 1: Buy from us because...
    Page 2: Our website address is...
    Page 3: Here's a special offer...
    Page 4: Our website address is...
    Page 5: Buy from us because...
    Page 6: Our website address is...
    ...and so on, repeating until the end of the brochure. The intention is for the footers to update automatically if the pagination of the brochure in question needs moving around - or if the messages need changing.
    Thanks!

    Thanks, but the text needs to be on a single master page which every page is assigned to. This is so the text alternates correctly regardless of whether new pages are inserted or moved. If I assigned separate master pages to individual pages and then moved the pages to a different location, the alternating footer text would then fall out of sync. I hope that made sense!

  • Field value in page number X

    Hi everyone
    By using JavaScript, how can I get field value in page number X at runtime?
    Thanks

    I can recommend you to check the JavaScript scripting guide: http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_basics.pdf
    Especially last chapter called "Examples of Common Scripting Tasks", last three sub-chapters working with the instance manager. Shows how can you add, delete, count, view, move instances.

  • Help with header field on multiple pages

    I am trying to print three multiple page documents.  The first document in the dat file has data in a header comment field.  The last two documents in the dat file do not have data for the header comment field. On the form I have defined this comment field as global.  When I print the documents the first document comment is being printed on the last two documents that should not have comments.
    If I remove the global condition for the comment field, then the comment is only printed on the first page of the first multiple page document.  Is it possible to print the comment on each page of the first multiple page document and not print the comment on the documents that should not have a comment?  Thanks for any help.

    Got it. Thank you. I'm having one other problem though. I
    keep getting this bizare message every time i save or try to use
    the template:
    The is an error at line 41 column 7 (absolute position 2486)
    of "~pathandfilename.dwt": Nested editable regions
    The only thing at line 41 is the <body> tag. I took all
    the formating out to try to trim this out... any thoughts about
    this one.
    Thanks G

  • How do I hide the header on the first page?

    Dumb question, I know. But I can't find it addressed in the online help. It should be obvious.

    If I understand your question - you would like the second page and following to have a different header? -correct Robert?
    Go to the Inspector/Layout (second icon from left) and click the Section tab. Then check off the First Page is Different configuration option.
    -Alan

  • How do I hide the comment-field in a pages document?

    I'm currently writing a document in pages, and added some comments to my own text (the yellow notes). When I was done with the comments, I removed them, but the area to the left of the document where all of the comments were shown, did not dissapear.
    So, now I have a gray area that takes about 25% of the document window, that I want to get rid of.

    Look in the menu View!

  • How do I put the page number in my header so the header changes with every page

    I need to write a paper for my english class and I need the header to contain the page number so it changes with each consecutive page.
    I need to know ASAP! Thank you!

    Click in your header > Menu > Insert > Page Number
    Peter

  • How do I make multiple fields dependent on a checkbox?

    I've got about 10 fields in an adobe form that I want to appear and be accessible if a checkbox is checked.  If the checkbox isn't checked, then I don't want them accessible or visible.  Is this possible?

    Sure it is. The code can be made much simpler if you use hierarchical naming for the fields. For example, suppose all of the fields that you want to show/hide have a prefix of "group1.", (e.g., group1.name, group1.address, group1.state, etc.), then you can use the following code in the Mouse Up event of the check box:
    // Get the value of this check box
    var v = event.target.value;
    // Show/Hide the group1 fields depending on the value of this check box
    getField("group1").display = v === "Off" ? display.hidden : display.visible
    It's often a good idea to reset the fields whenever they are hidden or shown, especially if the form data will be exported, so that the form data is consistent with the state of the form. If you want to do this, you could add this line to the beginning of the script:
    // Reset the group1 fields
    resetForm(["group1"]);
    If you don't use such a naming system, the second line of code would have to be repeated for every field in the group, using the indivudual field names of course, and the resetForm statement would have to include multiple array elements for the names of the individual fields.

  • How to increment a value in a textfield based on page number

    Hi,
    I am doing PDF based print forms which is non interactive, i got a requirment where i have to increment the binded value of a text field based on page number.
    presently i am using this code in initialize event of that textfield.
    var curpage = $layout.page ( ref ( $ ) )
    var totpages = $layout.pageCount()
    $.rawValue = $.rawValue - totpages
    $.rawValue = $.rawValue + curpage
    but this is not helping me, can anyone help me regarding this

    Thanks for yor reply.please you can tellme clearly how to set use 'NQ_SESSION.USER' to set the value to logged in User.i.e i have circle table in that users and circle names will be there.it is teradata database.so how can i set that in to the dashboard prompt and one thing along with that prompt the follwing prompts will be there
    mobile no<>
    date<>
    circle name<"user">
    this is my requirement so please help me step by step what to do for achiving this.
    thanking oyu

  • Getting page number

    Hi, I have a label in my report which is a placeholder column. Is there a way which I can find out which page number that label will print on?
    Report Builder 10.1.2.3.0
    many thanks

    Like InoL said, srw.get_page_num will tell a formula what page number. If you want your field to display the page number on the report output, set the field source to "Page Number".
    function F_SignatureFormatTrigger return boolean is
    /* Using the "Print object on" property did not control the
       signature line because it's in the margin.*/
    v_page_num          number;
    begin
         srw.get_page_num (v_page_num);
         if     v_page_num = 1
         then     return (TRUE);
         else     return (FALSE);
         end if;
    end;

  • Conditional formatting based on page number that resets on repeating frame

    Hello everyone,
    I have searched through multiple forums on multiple sites and haven't come across anyone who has accomplished this.
    I have a report with pages numbers that reset on a repeating frame.
    I have a text boiler plate that I want to only show up on page 1. On every occurrence of page 1.
    SRW.GET_PAGE_NUM does not work because it returns physical page number.
    I'm trying to access the value of the field for my page number. The value comes from "source" drop down with value of "Page Number".
    I've tried accessing the <&page number> in the PL/SQL of my conditional formatting trigger but no luck.
    This report is 14K plus pages so I'd rather not be inserting and selecting the value back out of the database.
    Does anyone have any ideas??
    Thanks,
    Alan

    To avoid inserting/selecting from the database
    Maybe you could create a small package on the database to store page numbering information.
    Then use get/set routines per your requirements.
    CREATE OR REPLACE PACKAGE rep_page_no IS
       gPageNo NUMBER;
       PROCEDURE set_it(pPage NUMBER);
       FUNCTION get_it RETURN NUMBER;
    END rep_page_no;
    CREATE OR REPLACE PACKAGE BODY rep_page_no IS
       PROCEDURE set_it(pPage NUMBER) IS
       BEGIN
          gPageNo := pPage;
       END set_it;
       FUNCTION get_it RETURN NUMBER
       IS
       BEGIN
          RETURN(gPageNo);
       END get_it;
    END rep_page_no;Then in your repeating frame you could access this package rather than insert/select from any database table.
    Let me know if this works, I might like to try it.
    Thanks

  • Resetting all header fields except page number

    Hi,
    I have a requirement where I need the header values to reset at every record, except the page number. In other words, the page number should iterate at the report level, and not the section level. using for-each-group@section resets the page numbers. Without @section I get the correct page numbers but the other values in the header do not reset either. Is there any way to stop the page numbers from resetting when using @section. Alternatively, is there a way to get all other header values to reset without using @section?
    Thanks,
    Reema

    Hi..
    Thanks for the reply...
    I'm using for-each-group@section so that in the header part of the report the header changes for every group on every page..was this your scenario also..?? If I join the header to the body of the template the header gets displayed when ever the group changes..but woldn't display on every page..
    Also, I don't want the page number to get reset...
    Variable in a header..
    this thread was posted by me but was left unresolved..I think you might be using for-each@section but not for-each-group@section !!
    Thanks...

  • ?fo:page-number? in if statement in the header section

    Hi,
    is it possible to put the <?fo:page-number?> in if statements??
    like <?if:fo:page-number>1?>STOP<?end if?>
    i have a requirement that the column should not be displayed in the succeeding page except for page 1. also the column have the table property REPEAT AS HEADER ROW.
    example:
    Page 1
    DOG
    CAT
    RAT
    FISH
    PAGE 2
    CAT
    RAT
    FISH
    PAGE 3
    CAT
    RAT
    FISH
    thanks, and i hope im able to explain well my problem . . .

    Hi,
    Did u try using the MS Word native functionalit --Option : Different First page –header option or Different Odd & Even Pages.
    hopefully this will help you to achieve your requirement.
    Regards
    Ravikumar Reddy
    +971 56 106 2436

  • How to get the text field in the header for only first page of the report

    Hi,
    I am developing reports in BI Publisher Enterprise where i am facing problem i.e., i have to get some text field in header,for only first page in the result but it is displaying in all the other pages of the report in result.So,please if you have any idea of how to solve it, please reply.It is required as early as possible.
    Thanks in Advance

    Invalid path? What are you doing? Writing the report output to an invalid directory?
    Where are your terms and conditions? It would be very easy just to put them in a database table and select them in your report query.

  • Hiding Image field based on the page number in Adobe Form- Script

    Hi Folks,
    I have a problem with the print form that I am working on. I need to insert an image of lines (OMR) based on the page numbers. For the OMR part, the first page will always have 4 lines as a image, the middle pages will have 3 lines as a image and the last page will have two lines as a image.
    I have uploaded these 3 images a BMPs in SE78 and I am using Xstring of these images in the form. I have two master pages. First master page is for the first page and the second master page is for the remaining pages. The first master page will always have the 4 line image. I created a positioned subform in the master page2, in that subform, I have 2 hidden numeric fields, as the run time properties one for the current page number, other one for the total number of pages. I placed those two images(one for the three line image and the other one for the two line image) exactly on the same location positioned dimensions wise. 
    I have written the java script for these two image fields to show based on the page numbering. But, somehow, it is not working. Can anybody please let me know where I am doing wrong. I am posting my java script here.
    for the three line image:
    var cp = data.PageSet.MasterPage2.OMR.cpage.rawValue;
    var np = data.PageSet.MasterPage2.OMR.npages.rawValue;
    //if(data.#pageSet[0].MasterPage2.OMR.cpage.rawvalue == data.#pageSet[0].MasterPage2.OMR.npages.rawvalue){
    for (j=0; j<xfa.layout.pageCount(); j++){
      if(cp == np){
        xfa.resolveNode("data.PageSet.MasterPage2[" + j + "]").OMR.OMR2.presence = "hidden";
      else{
        xfa.resolveNode("data.pageSet.MasterPage2[" + j + "]").OMR.OMR2.presence = "visible";
    For the two line image:
    var cp = data.PageSet.MasterPage2.OMR.cpage.rawValue;
    var np = data.PageSet.MasterPage2.OMR.npages.rawValue;
    for (j=0; j<xfa.layout.pageCount(); j++){
      if(cp == np){
        xfa.resolveNode("data.PageSet.MasterPage2[" + j + "]").OMR.OMR3.presence = "hidden";
      else{
        xfa.resolveNode("data.pageSet.MasterPage2[" + j + "]").OMR.OMR3.presence = "visible";
    Please give me a direction as this is kind of hurry.
    Thanks,
    Srinivas.
    Edited by: srinivas kari on Jun 9, 2010 2:03 AM

    HI Otto,
    Thanks for the response. You are right, I am struck with this image. My problem was to keep the OMR marking on each page based on the page number. It is like a lines with 10mmX10mm dimension at the top right corner for the sorter machine to know the number of pages to put in the envelope. The logic for this is, on the first page, it has 4 lines each 3mm apart. On the middle pages it has 3 lines . On the last page it has 2 lines. When the sorter machine picks these, it looks at the first page with 4 lines, it will count as a first page, it will continue through the 3 line pages as the middle pages until it reaches the 2 line to know it as the last page. This is all happens in the master pages. I have two master pages , one for the first page and the second one for the remaining pages.
    At first I did not know how to To achieve this, I created 3 images. one with 4 lines, another ones with 3 lines and 2 lines. The 4 lines image was on the first master page. The 3 lines and 2 lines images were on the second master page at the same place as the image fields positioned. Thats where I was trying this scripting. I was trying to capture the current page and number of pages. Based on these, I was trying to place them.
    Is there any other way to achieve this instead of using the images? I thought of sy-uline. but some in the forum told that its not going to work. Even if I use the sy-uline, I have to do some script to achieve this I believe.
    Any inputs on this.. Please give the direction.
    Thanks,
    Srinivas.

Maybe you are looking for