Page number in body

how to get page number in body of report

There is solution for this. please refer to this thread
http://social.msdn.microsoft.com/forums/en-US/tfsreporting/thread/b901c9b4-320e-4fbc-afa9-495d5566c168/
With the Data or Layout tab view active select "Report" -> "Report Properties"
On the "Report Properties" dialog select the "Code" tab
  In "Custom code:" add the new Functions to get the page numbers:
Public Function PageNumber() as String
     Dim str as String
     str = Me.Report.Globals!PageNumber.ToString()
     Return str
End Function
Public Function TotalPages() as String
     Dim str as String
     str = Me.Report.Globals!TotalPages.ToString()
     Return str
End Function
Use it like:
="Page " + Code.PageNumber() + " of " + Code.TotalPages()
Thanks Ayyappan Thangaraj, http://SQLServerRider.wordpress.com

Similar Messages

  • BI Publisher - if page number is not divisible by 2 then print a blank page

    Hi,
    I have an BI Publisher rtf word template. I want to be able to print a blank page if the page number is not divisible by 2. Does any body know how this can be done? Your input is greatly appreciated and thank you so much in advance.
    MT
    Edited by: user11177994 on Mar 29, 2010 8:19 AM

    Hi Dominic,
    Thank you for the link. The problem that I have is when the job specification last page prints on the front of the page, and the next job specification prints on the back of that page. There is no way I can control what page it is going to print on. This is depending on how much description the user puts in. Any suggestion is greatly appreciated.
    I do have another issue too, and you maybe able to help me with this. Below is a list of form fields on my template. When the job specification is printed on more than one page, I could not get the fk_job_title to print on the continuous pages. Is there a way I can code this fk_job_title to print on all of it's continuos page? I have tried many different ways but could not get it to print. I also posted this in the forum, but didn't get any respond.
    ** form fields **
    CLASS TITLE: F fk_job_title PAY GRADE: p_grade
    JOB CODE: job_code SALARY RANGE: s1 - s2
    LOCATION OF WORK: work_location
    GENERAL DESCRIPTION: general_descr
    ESSENTIAL WORK TASKS: work_task
    KNOWLEDGE, SKILLS, AND ABILITIES: knowledge_skill
    EDUCATIONAL AND EXPERIENCE: education_exp
    SUBSTITUTIONS: sub
    CERTIFICATIONS/LICENSES: certification_license
    OTHER JOB ASPECTS: job_aspect E
    PB
    Thank you so much,
    MT

  • Print Multiple copies of report, and resetting Page number for each copy.

    Dear frnds!
    i am using developer 6i reports i have a problem.
    i want to Print Multiple copies of report, and resetting Page number for each copy" that is 4 copies of an invoice is required
    1 - for user copy
    2- gate copy
    3- accounts office
    4- office copy
    any body please tell me the solution "i am using oracle 9i and developer 6i"
    Thanx
    Ibrar

    Hi,
    I was wondering if you were able to get your multiple copies working? Below is what I have so far, just trying to get it to work before changing the actual template.
    <?for-each-group@section:R5542520/Pick_Slips_Detail_Lines_S3;PickSlipNumber_ID260?>
    <?variable@incontext:G1;R5542520/Pick_Slips_Detail_Lines_S3;PickSlipNumber_ID260?>
    <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,3,1)?>
    HEADER
    PSN: <?$G1/Pick_Slip_Number_Display_ID54?>
    PSN Detail: <?$G1/PickSlipNumber_ID260?>
    Page 1 of 3
    <?start:body?>
    BODY
    <?$G1/LineNumber_ID6?>
    <?end body?>
    FOOTER
    <?end for-each?>
    <?end for-each-group?>
    XML:
    <R5542520>
    <Pick_Slips_Detail_Lines_S24>
    <Header_Custom_Section_S24>
    <Pick_Slip_Number_Display_ID54>123456</Pick_Slip_Number_Display_ID54>
    <PickSlipNumber_ID260>123456</PickSlipNumber_ID260>

  • 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.

  • How do I put page number at the center of the bottom of page one and the rest of the page numbers at top right corner?

    How do I put page number at the center of the bottom of page one and the rest of the page numbers at top right corner?

    Put a section break at the bottom of page 1
    Then insert your page number in the footer of page 1.
    Go to page 2 and click in the body of the text;
    Inspector > Layout > Section > uncheck Use Previous Headers & Footers > click in Header on page > insert > Page Number
    Peter

  • Can't see 'white' colored page number on colored object/paper

    I am using Pages '09 (v 4.3) and am having a devil of a time trying to get a 'white colored' page number to show up over a colored object that is streched over the sheet/paper to provide a color background. The problem seems limited to only when I want to use white, as any other color in the palette will show (assuming that there is enough contrast between the background color and selected page number color). I'm seeing this problem in a sheet where I want to use a black background with white text in the body (no issue there) and a white colored page number. Anyone else seen this? Or perhaps I have missed something simple?

    Peter -
    Is it there when you zoom in? No amount of zoom or lack thereof changes the situaiton.
    Is it there if you increase its point size? Nope.
    Is it there if you change the font? Nope.
    Have you tried using white from the Color Picker? Yes, no matter how white is selected the end result is the same.
    What is the Opacity of the text in the Graphic Inspector? Text does not have an opacity option/selection. Perhaps you are asking what the Opacity is of the solid color I am trying to set as the background, in which case it is 100%.

  • Page Number does not display on every page

    I am having a problem showing the page number on every page. I can get it to show on the first page if I place the XML tags at the top OR if I place the XML tags at the bottom then it shows only on the last page.
    I tried to use the <?body-start?><?body-end?> tags and placing the page number in front of or behind these. I have tried to insert the native word page number functionality as well as <?fo:page-number?> and get the same results.
    Any help would be greatly appreciated -
    Thanks,
    Rob

    I have inserted the page number in the RTF and it definitely shows up on the first page but not on any of the following pages.
    As a side note - if I use Word's header and put anything up there it does not show up at all on the template.

  • For each loop start on odd page number

    Hy,
    I've an rtf template with a for each loop. I want to skip a page between each loop and to start each new loop on an odd page number (duplex printing). It's easy to skip a page but i don't know how to start each loop on an odd page. i've tried this before or after my for-each
    <?section:force-page-count;'end-on-even-layout'?>
    but it doesn't work for me.
    Sorry for my english
    regards

    One way of doing this is to create an object (B_1) at the end of the report and only have the object print if the current page is an odd page.
    - To force the page break, you need to set the "page break before" property against "B_1".
    - To test the page number in the format trigger use the srw.get_page_num(page_num out number) built-in function.
    You need to make sure that "B_1" is formatted after all the other objects in the layout. One way of ensuring this is to create a frame around all the other objects and make the frame variable. Any objects that come below the frame will be formatted after the variable frame.
    There is still the issue of any margin objects. Since margin objects print before any objects in the body, your margin objects will still print in the overflow page. However, this may be what you want if you're printing the page number in the margin.

  • Page number in adobe form

    when the form execution goes to 2nd page it displays a page number on right potion lil below top margin..
    can some body tell me where the setting is for that pageno.. like sy-pagno or any thing like that..
    reminding you it doesnt show that page number on the form when it is a one page output. only for >2 pages it shoes...the page number.

    solved

  • 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

  • To reset page number after each new section in DeskI

    I have a master/detail report where the master is "Customer name". I have a requirement to reset the page number at each new  Customer name.
    i.e. If "Customer A" spans to 3 pages and "Customer B" spans 2 pages. Then for Customer A the page number should be Page 1 of 3, Page 2 of 3, Page 3 of 3. Then Customer B should have page number as Page 1 of 2,Page 2 of 2.
    1. The Page number can be obtained using PageInSection but only if I display it inside the section body and select "Repeat on every page" . But I need to display it in Page footer.
    2. I am unable to get the total No.of Pages per section unless I do some calculation using the no of rows per Customer. Is there any other way of getting this detail?
    Please help on the baove 2 issues. This is very URGENT.

    Dear Thendral A,
    The "PageInSection" function resets the page number to 1 at the start of each new section in the specified section level.
    For Example:
    you have a report with two section levels, Country and Quarter.
    You set every value of Country to start on a new page and enter the following syntax in a cell placed WITHIN THE SECTION THAT NEEDS THE RESETTING OF THE PAGE (it cannot be placed in the header or footer, as it can then not refer to the relevant section. It will give the value 0 instead), to restart page numbering to 1 for each value of Country:
    =PageInSection(1)
    where (1) is Country which is section 1 in the report.
    If there are any following sections these can also be reset via this formula with the use of the relevant section number.
    This option can be used effectively when you set each value of a section to start on a new page. To do this, check the Start on a new page option in the Section Format dialog box.
    Do remember that the result will only be seen in the report, when the option View/Page layout has been set, otherwise the result will be seen as a 0 at each section (this however does get correctly displayed in the Print Preview, and when printing without the page layout option set).
    I hope that these information help you to understand the functionality of the PageInSection function.
    Regards,
    Samanta F

  • 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...

  • On my macbook pro when opening a page i can not save it as a pdf only give me the option of saving it as a web page can any body help me on this I have tryed so many times without success

    on my macbook pro when opening a page on safaryi can not save it as a pdf only give me the option of saving it as a web page can any body help me on this I have tryed so many times without success?

    Just select Print in Safari and then, in the bottom left-hand corner, select PDF and you can save it to whichever flavor pdf file you like.
    Clinton

  • Reseting page number in Word RTF template for BI Publisher PDF generation

    Hi!
    Apex 4.0.2, Oracle 10.2.0.4, BIP 10.2
    Bills are created based on Word RTF file with BI Publisher. Reszulting file is one big PDF file, which has many pages.
    Word RTF template is grouped on BILLS.ID field with page break option. So one BILLS.ID may have one or many pages (according data).
    How to create RTF template (for PDF BI Publisher generation) with reseting page numbers when grouping value change.
    Page numbers are in footer in format
    curr_group_page/total_group_pages
    where:
    curr_group_page is current page number in group (defined with BILLS.ID field),
    total_group_pages is total page number of pages in group (defined with BILLS.ID field).
    I need to reset numbering whenever BILLS.ID (group) change.
    Example:
    ID=1 (4 pages)
    1/4, 2/4, 3/4, 4/4
    ID=2 (1 pages)
    1/1
    ID=3 (2 pages)
    1/2, 2/2
    ID=4 (3 pages)
    1/3, 2/3, 3/3
    etc.
    How to achieve that kind of numbering?
    Any help appreciated.
    Regards,
    Damir Vadas
    Edited by: Damir Vadas on May 16, 2011 12:49 PM

    Simple question.. Does your posting deal with an APEX issue or a BI Publisher issue? The posting you have deals with the RTF add-on for Word that builds report layouts for BI Publisher. I suggested in my response that you move it to a more relevant forum..
    If you feel that me alerting you to the fact your are VIOLATING forum policy is an issue, please feel free to ask others their view.. (posting to a 3 year old closed thread, creating MULTIPLE threads for a single issue..) You do NOT seem to get the idea that posting this in the Bi Publisher support forum would probably get you a BETTER response than here.. Asking pl/sql questions here will also get people to refer your questions to the PL/Sql Support forum..
    Also, here is a POSSIBLE answer from the BI Publisher Forum: http://forums.oracle.com/forums/thread.jspa?threadID=594805
    This Is The APEX SUPPORT forum, we deal with SUPPORT questions on APEX (Application Express)..
    Thank you,
    Tony Miller
    Webster, TX
    You know, I used to think that it was awful that life was so unfair. Then I thought, wouldn't it be much worse if life were fair, and all the terrible things that happen to us come because we actually deserve them? So, now I take great comfort in the general hostility and unfairness of the universe.
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Page number reset in .rtf template

    Hello,
    In the AR statements report, If I run the report for mutiple customers, page number has to be reset for each bill_to customer...
    I have the header part from the second page, so when I run the report for multiple customers...even for the new customer's first page...header is coming....
    So I assume by resetting the page number for every bill to automatically solve the issue of header from second page...
    Please advise...how to reset the page# based on a condition ( for each bill to)...I know it work with @section....
    but my template is like <?for-each-group:G_STATEMENT;./STATEMENT_DATE?><?for-each-group:current-group();././././././././././././././SEND_TO_ADDRESS_ID?>
    -Sridhar
    Edited by: user7751421 on Oct 12, 2011 4:32 AM

    If you could send me your xml and template i can give a try.
    [email protected] is my email id.

Maybe you are looking for