Printing page numbers in report

hi,
I want to print the page numbers in report in a format
of PAGE 1 OF 10
   PAGE 2 OF 10....
can anybody help me in this
thanks in advance.
neha.

Hi Neha,
  Similar question was posted earlier by someone..
It will help you.
       line-size 80
       line-count 65(1)
       no standard page heading.
data: imara type table of mara with header line.
selection-screen begin of block b1 with frame title text-001 .
parameters: p_check type c.
selection-screen end of block b1.
start-of-selection.
  perform get_data.
  perform write_report.
end-of-page.
  perform end_of_page.
FORM GET_DATA
form get_data.
  select * into corresponding fields of table imara
        from mara up to 315 rows.
endform.
FORM WRITE_REPORT
form write_report.
  data: xpage(4) type c.
  data: lines_left type i.
  loop at imara.
    write:/ imara-matnr.
    at last.
      if sy-linno < 64.
        lines_left = ( sy-linct - sy-linno ) - 1.
          skip lines_left.
          sy-pagno = sy-pagno - 1.
      elseif sy-linno = 64.
      skip 1.
       sy-pagno = sy-pagno - 1.
      endif.
    endat.
  endloop.
  write sy-pagno to xpage left-justified.
  do sy-pagno times.
    read line 65 of page sy-index.
    replace '****' with xpage into sy-lisel.
    modify current line.
  enddo.
endform.
Form  end_of_page
form end_of_page.
  write:/32 'Test Program',
        at 62 'Page:', at 67 sy-pagno, 'of', '****'.
endform.
Regards,
Sailaja.

Similar Messages

  • How to print page numbers in adobe form

    Hi,
    Can anybody tell me how to print page numbers in adobe form.
    Thanks in advance
    Chaitanya

    Hi,
    Yes the field page n of m is used normally for printing page numbers. But it won't display the current page of total pages by itself. You have to set the run time property to n (current page ) and m (Total number of pages). Carefully select the # (current page ) and ## (Total number of pages). Hope this works for you.
    My requirement is to have the user control on current page. For Example:
    Example for a Invoice with 5 PO items (stands on 2 pages) :
    1st  page is the letter : no page number
    2nd page is the 1st page of the 1st copy of the invoice : we should read u201C1 / 2u201D
    3rd page is the 2nd page of the 1st copy of the invoice : we should read u201C2 / 2u201D
    4th page is the 1st page of the 2nd copy of the invoice : we should read u201C1 / 2u201D
    5th page is the 2nd page of the 2nd copy of the invoice : we should read u201C2 / 2u201D
    Presently i cam getting the current page number for page 4th as 3 / 2 and for 5th page 4 / 2. I could able to control the total number of pages from print program. But when i am printing the second copy (4th and 5th pages), I couldn't able to control the current page number. I need to initialize the Current page count (4th page ) as 1.
    I have used the follwing java scripting:
    this.rawValue = wv_pages - xfa.layout.page(this)
    where wv_pages is total no of pages calculated from print program.
    Please help me in this regard with some formcal or java scripting conditions.
    Thank You,
    Regards,
    Naresh.

  • Printing page numbers in smartform

    Hello all,
    we need to print page numbers as Page 1 of 10 etc..
    But I can not use SFSY-FORMPAGES because I print multiple documents.
    I need to know how many pages will be printed in advance.
    Every time a new document comes we have to start the count again.
    Have anyone come across this and solved it. Pls help.
    Useful answers are rewarded.
    thanks.

    hi
    try this
    Page&SFSY-PAGE& of &SFSY-FORMPAGES(3ZC)&
    don't forgot to write 3zc otherwise it will show '*' ones the page no will exceed 10.
    regards
    vijay
    reward points if helpfull

  • Why won't my printer print page numbers? The page numbers show up when I preview the document by don't print on the page.

    Why won't my printer print page numbers in a document? The page numbers show in print preview, but will not print on document.

    Perhaps you have set the margins so tight to the edge of the paper that you have gotten into the non-printing area for your printer. Most printers have a dead zone.
    What are your margin settings?
    Jerry

  • Printing page numbers in an ALV report with multiple grids

    Hi,
    I have developed a report using OO ALV GRID. The output is having multiple grids navigated using a menu button appended to the standard tool bar
    (Ref report: BCALV_GRID_07). On navigation, we are able to display specific titles when each grid is displayed.
    When we print those individual pages (the grids), we are able to print the page numbers and the title for the first grid but when we display the next grid and print, we are unable to initialise the page number
    and print specific title. The page numbers continues from the last printing.
    I am looking at identifying the grid when the print event - PRINT_TOP_OF_PAGE is triggered so that a grid specific title can be printed and also page number initialised.
    Any suggestions is highly appreciated.
    Thanks.
    Mani.

    You cannot have one event for all the grids as you cannot identify for which grid the event has fired. You need to activate the event for each of the grid and handle the code independently.
    regards,
    Ravi
    Note - Please mark the helpful answers

  • How to print page numbers like 'Page 2 of 10' on an ALV report

    Hi,
    I've seen a few threads regarding this, but haven't seen any code that actually works. 
    What I'd like to do is print page x of y (i.e. Page 2 of 10) on an ALV report once the report is printed.
    Is this actually possible?  If so, what are the steps and coding required? 
    I greatly appreciate your help experts!
    Mark

    Hi Mark,
    I think there is no better way than calculate it before doing the output. If you do not have extra-new-page, the total number of pages may be calculated as the number of lines displayed divided by lines on one page - this will depend on the lines used for top-of-page and end-of-page. Also filters and subtotals could not be used.
    An other approach could be to read the current page number in end-of-list event and then scan the whole list using READ LIST and MODIFY LIST in each page top accordingly.
    Because it is decades ago I printed a list last time I will never have the chance to try.
    Regards,
    Clemens

  • Printing Page Numbers With A Sub Report

    Hi, I have a Crystal Report (XI) that includes a subreport which is identical to the main report because I am actually making the report print 2 copies of the same report with different critera in the detail section only. On the main report I have a Page Header section which I am using the special field "PAGE N of M", so on all pages of the report it is printing this page number. I  My issue is listed below:
    First page of report                    "Fred's Place"                 Page 1 of  2 (Correct)
    Second page of report              "Fred's Place"                 Page 2 of  2 (Correct)
    Third page of report                   "Fred's Place"                 Page 3 of  2 (Not Correct)
    Fourth  page of report                "Fred's Place"                 Page 4 of  2 (Not Correct)
    The first/second page are printing correctly with data being pulled from the main report, but the third/fourth pages are not printing correctly with data pulled from the sub report. My question is how to get the third/fourth pages to print as follows:
    Third page of report                   "Fred's Place"                 Page 1 of  2 (Correct)
    Fourth  page of report                "Fred's Place"                 Page 2 of  2 (Correct)
    Thanks for your help
    Jim Dyer

    Jim,
    Try passing the total page count from the main report to the subreport via a shared variable. Then set up a counter formula in the fake PH of the subreport and convert the counter and the shared variable so that it reads page 1(counter) of 2(shared variable)
    You should also be able to suppress the extra pagenofms in the main report when pagenumber > totalpagecount

  • Printing Page Numbers - From To

    Please can you help me.
    I am exporting a Crystal Report to PDF per customer through vb code.
    I need to print a maximum number of pages (that will fit in an envelope e.g. 20) and then continue printing his data into a second PDF where it left off.
    Therefore I am trying to print out the crystal report in my VB.NET code by specifying a "Page From" and a "Page To".  How can I do this??
    For example I want to be able to say Print out pages 1 to 20
    Then print out 21 to 40 but the page count in the 2nd report should say (1 to 20)
    Thanks
    Ric

    Don,
    Thanks for your help.
    Your solution to resetting page counts in the report might be part of a solution...
    First of all - How can I reset the page counts within a formula?
    However my problem is a little more complex...
    In my VB code, I output the Crystal Report as a PDF file.
    However in the example I gave, where the customer has 30 pages, I need to generate 2 PDF files.
    The first PDF will be called CUSTXYZ_1.PDF (contains pages 1 to 20).
    The second PDF will be called CUSTXYZ_2.PDF (contains pages 21 to 30 but numbered as 1 to 10).
    I still need to find a way to output one report as 2 PDFs with pages 1 to 20 in the first pdf
    followed by 21 to 30 in the 2nd PDF.
    Maybe in my vb code i need to find a way to say:
    Print Pages 1 to 20 in one PDF
    Then Print Pages 21 to 40 in the second PDF
    I am not sure how I can do that...
    Any more ideas??
    Ric

  • Printing page numbers in ALV Hierarchical

    Hi All,
    I have a requirement to display page numbers in the report and also when in printing the page numbers will be displayed like this 'Page xx of yy'. I placed this one in the top_of_page event of the function module REUSE_ALV_HIERSEQ_LIST_DISPLAY. The only display is the Page xx while yy is not. For xx i used the sy-pagno but for the yy as total numbers i try all system fields but still not display. Please help its urgent guys.

    Hi,
      Check thease therds
    https://forums.sdn.sap.com/click.jspa?searchID=12193297&messageID=269935
    https://forums.sdn.sap.com/click.jspa?searchID=12193297&messageID=2461055
    Regards
    Kiran Sure

  • How to display page numbers in report

    hi all,
    i would like to know how to display page numbers in this format " 1 of 5" in the report.
    Any help would be much appreciated.
    thanks
    seema

    Hi,
    Check this too...
    Page No. in ALV output
    If you query is solved, kindly close the thread.
    Regards,
    Anjali
    Message was edited by: Anjali Devi Vishwanathan

  • How to print page numbers on a PDF

    I have a large PDF (50+ pages) that I need to print out. The PDF does not have page numbers on it, so I am wanting to know if there is a way to have Preview or Acrobat add page numbers to each page for printing?

    in Acrobat, from the Document menu, drag to 'Add Headers & Footers'...
    in the dialog box that pops up you can add page numbers or other info to either a header (top of page) or a footer (bottom of page)...
    cheers

  • How to print page numbers on physical pages conditionally?

    Hi,
    my report has a single logical page comprising of 3 reapeating frames , each getting printed on 3 different physical pages. I need to print page number at the bottom of the page in the case of two repeating frames while on the side of the page in the third case. How do I do this?
    TIA
    Ranjit

    i think u only need to say page break before on ur third repeating frame and ur problem is solve.
    repeating frame 1 and 2 on the firstpage getting page 1 and repeating 3 on page 2.
    cheers.

  • Texy edit - how to print page numbers only

    I wish the page numbers in TextEdit to be printed on my documents; in TextEdit preferences, when I select the option to number pages when printing, it also prints the date and document title. How can I have it only print the page numbers?

    It doesn't seem like you can just have the page numbers printed with TextEdit. When the help text appears in the preferences for printing the number of pages, it indicates it will also print the date and the title, so it is doing what it is designed to do, despite the misleading label for that item. Maybe another application (AppleWorks, BBEdit, Word?) can print just the page number.

  • TextEdit: how to print page numbers w/o Header

    I see the option to check "print footer and header" in the print dialog box. Anyone know how to just be able to print the page numbers in TextEdit (without the Headers on each page)?
    Thanks in advance for any help with this!

    TextEdit is a relatively simple program, with limited options. As such, I doubt the "print headers and footers" options are easily customizable. Other word processors have the ability to manage headers and footers separately. If you've got Pages, or Word, or the free alternatives such as OpenOffice/NeoOffice then you can set up your documents to print just header or footer info with only page numbers.

  • Problem printing page numbers in black and white

    Using Pagemaker 7.0 and creating a PDF file that I send to a printer. The interior pages of this newsletter get printed in black and white.  The page numbers do not show up in the black page number background oval.  The printer says that that is because the two colors used for the page number and the oval background both get converted to the same gray scale value.  He suggested that I set the page number to white and the background to black.  Is there any way to set the colors that are used for the page number and the background?

    You should make sure that anything on your interior pages is black and white, never trust someone else to convert things to B&W for you. If you are using a master page for the page numbers, that should be black and white too. You can have two master pages, one for color page numbers and one for black and white page numbers.
    Jay

Maybe you are looking for

  • Changes to Photoshop CS5 and Applescript

    Looks like there are some major Applescript changes to CS5, which is unwelcome for anyone with existing scripts. From what I can see, the difference (that affect me anyway) are a) PSCS5 seems to dislike referring to files with "as alias" and removing

  • Word wrap in jtable cell?

    Can there be some sort of "word wrap" whithin the individual cells of a jtable

  • Arguments in function passed through shell script

    HI all, I have a shell script test.sh it contains the following A=$1 B=$2 C=$3 D=$4 sqlplus usr/pwd<<eof a varchar2(10); b varchar2(10); c date; d date; a:='$A'; b:='$B'; c:='$C'; d:='$D'; func(a,b,c,d(; eof func() defbn func(name varchar2,trc varcha

  • Getting the class not found error in OAF customization - after upgrade

    Hi All, We have recently upgraded from 11.5.10 to 12.1.3 I have a customization in one of the OAF page, where in I click on a button, the information should be getting passed on to some other system. These customization classes are present in the .ja

  • How many times was a specific function module triggered?

    Hi, is there a transaction in SAP where i can get some information about function modules "how many times is a function module triggered". regards