Display page number in roman numeral

Is it possible to create a form field that will display the page number in roman numerals and increment by one digit on each of the following pages? If anyone knows of a script that will do this I would greatly appreciate it.

Yeah, it's possible. Create a unique text field on each page with this code as the custom calculation code:
event.value = romanize(event.target.page+1);
Then place this function at the doc-level (I didn't write that one):
function romanize(num) {
    if (!+num)
        return false;
    var digits = String(+num).split(""),
        key = ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM",
               "","X","XX","XXX","XL","L","LX","LXX","LXXX","XC",
               "","I","II","III","IV","V","VI","VII","VIII","IX"],
        roman = "",
        i = 3;
    while (i--)
        roman = (key[+digits.pop() + (i * 10)] || "") + roman;
    return Array(+digits.join("") + 1).join("M") + roman;

Similar Messages

  • Help needed- Reg: Display page number in SQL Reports

    Hi,
    I need to display page number in " page no: X of Y " format where X is current page & Y is total number of pages. Now I am able to display only the current page using ' sql.pno '. but not able to display in ' X of Y ' format.
    Any inputs in this regard will be helpful.
    Thanks & Regards,
    Anilkumar.

    Hello Anil,
    If you have the above requirement for Oracle Reports then follow the steps:
    1.In the Paper Layout view or Paper Design view, choose InsertPage Number.
    2. In the Insert Page Number dialog box, choose from the list the location for the page number.
    3.Click the desired page number format: Page Number Only or Page Number and Total Pages.
    Cheers,
    Suresh

  • Displaying page number in ALV grid display

    Hi,
    Is it possible to display page number in an ALV grid display?
    If yes, how?
    I tried it in top of page event, but it didnt work.
    Harmeet.

    hi,
    check out the sample code....
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program          = sy-repid
            i_callback_user_command     = 'F00007_USER_COMMAND'
            i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
            it_fieldcat                 = g_t_fieldcat[]
            it_events                   = gt_events[]
            i_save                      = 'A'
          TABLES
            t_outtab                    = g_t_final_report[]
          EXCEPTIONS
            program_error               = 1
            OTHERS                      = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
          FORM TOP_OF_PAGE                                              *
    FORM top_of_page.
    write : sy-pagno.
    ENDFORM.                    "top_of_page
    Reward Appropriate points.
    Regards,
    Mansi.

  • Get PDF Display Page Number Acrobat Reader

    Hi,
    I am working on some automation in that I used Acrobat Reader XI to view PDF.
    I want to get display page number of opened PDF.
    I used app.doc.pageNum();
    It is giveing me the page number when I used this code in Acrobat Debuger manually.
    But I am using VB.net. so please give me the solution how to run this code on opened PDF from vb.net and get the page number or can we create plugin which I can call from VB.Net code and get the page number
    because I am not getting app object in VB.net.

    sorry I typed it wron its app.doc.pageNum;

  • Displaying Page number in all pages of sap script output

    Hi All,
    I have a issues in displaying page number in all pages of sap script output.
    I have created a seperate window just above main window to display page number.
    I have given &PAGE& in the layout editor.
    Now in the sap script output i am getting page number as 1 in all the pages page number is not changing for pages-2,3, etc..
    Can anybody tell me the reason for the same!
    In some other objects same syntax is working fine. For this object it is not working!
    Is there any setting changes!
    Thanks i
    Thanks,
    Deep.

    Hi,
    Just check the Page Counter of the Next or Second Page which you defined.
    First page
    Mode                     START
    Numbering Type           ARABIC
    Second Page
    Mode                     INC
    Numbering Type           ARABIC
    Regards
    Bala Krishna
    Edited by: Bala Krishna on Oct 17, 2008 11:23 AM

  • Cross References Will Not Display Page Number

    Got some documents created in InDesign CS3 (MAC). When bringing them into CS4 (Windows) and trying to create a paragraph cross-reference the page numbers will not display. All the other text in the cross reference ("paragraph", the word "page", etc.) displays correctly. Even the cross reference under the "hyperlinks" toolbar shows nothing (instead of the usual # indicating a page number).
    However If I copy some of the same pages into a new document and create a cross reference in it the page number displays correctly. But since it's over 300 pages I really would hate to have to do that!
    Any ideas?

    Is it maybe because CS3 does not include the cross references function (not a feature until CS4)?
    That's a real problem if we use an outside source to create a lot of our documents and they're working in a previous version.

  • Possible to always display page number in footer on outside of facing page?

    Is it possible to configure the page number in a footer to always display on the outside of the facing page?

    In the Layout Inspector, in the Section tab, check "Left and right pages are different", then put the page numbers in the appropriate places on the left and right pages.

  • Displaying Page Number in Smartforms

    Hi,
    I'm doing a page break in smartforms by date. In my output, the page number displays Page 1 of *  (instead of Page 1 of 11) but when it displays 2 digits for the field SFSY-PAGE, it displays the total number of pages. (e.g. Page 10 of 11). I used the system fields (Page sfsy-page of sfsy-formpages). I just want to ask if any of you has an idea or have experienced this kind of error. Your help is highly much appreciated. Thanks!

    Hi
    current page / total number of pages
    &SFSY-PAGE& / &SFSY-JOBPAGES&
    Go through the link given below :
    http://help.sap.com/saphelp_nw04/helpdata/en/fa/0c145cd30111d3b568006094192fe3/frameset.htm
    With Regards
    Nikunj Shah

  • Display Page number in ALV List.

    Dear Friends,
        I want to display page numbers in ALV list print output. But I dont know how to do that without using objects.
    Please suggest.
    Regards,
    Madan.

    TRY LIKE THIS
    data : ifieldcat type slis_t_fieldcat_alv,
           wfieldcat type slis_fieldcat_alv,
           IEVENT TYPE SLIS_T_EVENT,
           WEVENT TYPE SLIS_ALV_EVENT..
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = IEVENT
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE IEVENT INTO WEVENT WITH KEY NAME = 'TOP_OF_PAGE'.
    IF SY-SUBRC EQ 0.
    WEVENT-FORM = 'TOP_OF_PAGE'.
    MODIFY IEVENT FROM WEVENT INDEX SY-TABIX.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = 'TOPOFPAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = IFIELDCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
       IT_EVENTS                         = IEVENT
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = ITAB
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM TOP_OF_PAGE.
    WRITE : /10 'HeadinG OF ALV'.
    WRITE : 100 SY-PAGNO.
    ENDFORM.
    ONE THING IS THERE YOU CAN USE WRITE FOR ONLY LIST DISPLAY NOT FOR GRID DISPALY.
    REGARDS
    SHIBA DUTTA

  • How can i display page number in this format in xml publisher report (1-1)

    in this format
    1-1
    1-2
    1-3
    2-1
    2-2
    2-3
    can i display page nos in this format in xml publisher please help me on this

    Hi,
    Use the SET COUNTRY..
    SET COUNTRY 'US'.
    write: / sy-datum.
    SET COUNTRY 'IN'.
    write: / sy-datum.
    Thanks,
    Naren

  • Display page number in page footer

    i want to displaypage numbers i nthe report footer.
    anybody tell me how can i get the page number in the report foolter for every page?

    In Compound Layout, there is an icon on the top left that looks like a printer. Click it. Choose Footer. in the Footer window, there is a variable called "Page Number." That will give you the page number for each page.

  • TOC page number as roman numerals, body as decimal

    Pretty new to the DDX world.  I'm using Cold Fusion 8 to generate a PDF.  I then use DDX to open the pdf, add a Table of Contents and headers/footers.  The Footers contain the page numbers.  Right now, the page numbers just start with the TOC (1) and go to the nd of the document.
    I'm trying to figure out a way to number the TOC with roman numerals, but the rest of the document with decimals.  Right now, I'll accept i, ii, iii, iv, 5, 6, 7... but I'm guessing my customer will want the numbering started over at 1 when we hit the body of the document.  I'll cross that bridge later.  Right now, I can't seem to find a way to mix the numbering.  I know PageLabel is the place to attack, but I've had no luck so far.  My basic DDX markup looks like:
    <DDX>
         <PDF result="out1">
              <TableOfContents>
                   <Header>
                   </Header>
                   <Footer>
                   </Footer>
              </TableOfContents>
              <PDF source="Doc1">
                   <Header>
                   </Header>
                   <Footer>
                   </Footer>
              </PDF>
         </PDF
    </DDX>
    I've placed <PageLabel format="lowerRoman"> at various placing with varying degrees of success.  Any help is greatly appreciated!

    Hello,
    i think the best way ist to create a 2 variables and add at every master page 1 to var1 or var2 .
    At every following site of the first master pages add "1" to var1 .
    At every following site of the second master pages add "1" to var2 .
    With this coding you can fill your var1 and var2 i think
    Put this on every site then i think you can fill var1 and var2 different.
    If not you must make a simple coding var1 = var1 + 1 at site1 and var2 = var2 + 1 at site2
    // data.#pageSet[0].Seite1.AktuelleSeite::ready:layout - (JavaScript, client)
    this.rawValue = xfa.layout.page(this);
    Regards
    Edited by: Florian Martin on Jun 28, 2011 10:51 AM

  • Display page number, but not on page one

    I'm using cfdocument to create dynamically create a pdf that
    includes multiple biographies (my sample has three records from a
    database) . In some instances, a persons biography is more than one
    page long. How can I display "continued from previous page" on
    those biographies that are two pages in length, but yet not display
    it for those biographies that are only one page.

    If you are using ColdFusion 8, then its fairly simple. You
    can do like this inside cfdocumentItem tag.
    <cfif CFDOCUMENT.CURRENTPAGENUMBER NE 1>
    Continued from previous page..
    </cfif>
    Or if it is for DocumentSection, you can do
    <cfif CFDOCUMENT.CURRENTSECTIONPAGENUMBER NE 1>
    Continued from previous page..
    </cfif>
    Let me know if that does not work

  • How to display page number based on group.

    Hi All,
    I have a report and it consists two groups. First group is displaying 20 pages and the second group is displaying 30 pages. My requirement is to display the page numbers based on the group. That is, the second group output page numbers should start with 1 after displaying first group output. So, the page numbers should be as followed in the report output:
    First group page numbers:
    Page 1 of 20
    Page 2 of 20
    Page 20 of 20
    Second group page numbers:
    Page 1 of 30
    Page 2 of 30
    Page 30 of 30
    How do I achieve the above requirement.
    Thanks in advance.

    Post your report related question in the [url http://forums.oracle.com/forums/forum.jspa?forumID=84]Reports Forum, this is the Forms Forum.
    Tony
    Message was edited by:
    Tony Garabedian

  • How to user page-number in If Condition of XML PUBLISHER

    Hi,
    Can any body help me regarding my issue...
    I have to control footer to display in first-page only...but not in other pages.
    for this i am going in this way..
    my thought is to use IF condition by checking Page-number =1
    but in practice i am unable to put the same in Syntax
    by using <?fo:page-number?> i could able to display page-number , but how could use the same in IF condition....
    Please help me asap.
    Thanks in advance
    srinivas poda.

    Hi srinivas,
    Different First Page and Different Odd and Even Page Support
    If your report requires a different header and footer on the first page of your report; or, if
    your report requires different headers and footers for odd and even pages, you can
    define this behavior using Microsoft Word’s Page Setup dialog.
    1. Select Page Setup from the File menu.
    2. In the Page Setup dialog, select the Layout tab.
    3. In the Headers and footers region of the dialog, select the appropriate check box:
    Different odd and even
    Different first page
    4. Insert your headers and footers into your template as desired.
    At runtime your generated report will exhibit the defined header and footer behavior.
    search in this forum, for this first page display only, you can find quite number of solutions.
    and you cant chekc like page-number == 1 ,
    as the pages are rendered at time runtime, at that time only the numbers will be available.
    if you cnat find in this forum, please open this thread again.

Maybe you are looking for