How to control over Page Number in the Page Header

Imrankhan

Active Member
Hi,

Can anybody help me to control over page number in the page header.

eg.,

In my report it prints 12 pages totally.
so The page No. in each page header will display like
1 of 12, 2 of 12, 3 of 12,......,12 of 12

I want to control the Page No. on break of DOCO

DOCO : 1001
1 of 4, 2 of 4, 3 of 4, 4 of 4

DOCO : 1002
1 of 2, 2 of 2

DOCO : 1003
1 of 6, 2 of 6, 3 of 6, 4 of 6, 5 of 6, 6 of 6

Thanks & Regards
Sheik Mohamed
 
Sheik Mohamed,

I remember a relatively recent thread covered this, I think. Someone suggested, if my memory is correct, to have two sections that print the report. They would be exactly the same except that one would actually print, the other would not. The printing one would also have the total number of pages. Using a driver section, first run the non printing section to get the page total for each doc, then run the printing section and populate the total number of pages.

You may like to do a search and find suggestions. Here is a post by Zoltán Gyimesi (and thread) that may be of assistance.
 
Hi peterbruce,

Thanks

From the Driver Section if i call the condition section to find the page number i can count the number of rows it prints. But to count the number of pages. I have to calculate like pageno = (Number of rows)/(rows print in one page)

To use this idea in R43500 - Report is very complicated. There are so many level breaks and condition sections in this report.

Thanks & Regards
Sheik Mohamed
 
Sheik Mohamed,

A suggestion:

There is a Page Header section in the R43500. You could include ER in the Do Section event of the Page Header section to accumulate a page counter. When the Document Number changes (in the level break), reset the accumulation page counter.
 
Hi Peter,

Thanks for ur quick response.

The page number can be reset using business function. But how can i find the number of pages of each DOCO.

We copied the Report R43500 and made a customised Report.
Actually in Report R43500
The Page Number get accumulated and display like

DOCO : 1001 Page No. 1
DOCO : 1001 Page No. 2
----------
DOCO : 1002 Page No. 1
DOCO : 1002 Page No. 2
DOCO : 1002 Page No. 3

In the customised Report we need to display the page number like this

DOCO : 1001 Page No. 1 of 2
DOCO : 1001 Page No. 2 of 2
----------
DOCO : 1002 Page No. 1 of 3
DOCO : 1002 Page No. 2 of 3
DOCO : 1002 Page No. 3 of 3

Thanks & Regards
Sheik Mohamed
 
Sheik Mohamed

Attached is an ugly, very ugly, suggestion, and the steps to accomplish it. Be very, very, careful. I have written it without reference to much - straight out of, what some refer to as my
crazy.gif
brain. I have NOT tried or tested it to see if it works.

Please let us know how it goes.
 

Attachments

  • 98309-PageNumbering.txt
    3.8 KB · Views: 244
One way to accomplish this goal is to use third party software such as Optio or CreatePrint. Of course these packages provide much more than "Page 1 of x" features.

Long ago I tried to to do what you're doing using the JDE toolset - I never could get it to work.

Good Luck
 
Sheik Mohamed,

I should also mention that in that, oh so ugly, suggestion, the data selection criteria for both R5543500A and R5543500B should be the same so that they retieve the same Purchase Orders. Any updating done in R5543500A should also be disabled.
 
Write a BSFN that you call when you want to reset the page number. The API inside this BSFN is:

ubeReport_SetPageNumberEx( LPBHVRCOM pBhvrCom, ulong ulPageNumber, BOOL bResetTotalPages )

The 'ulPageNumber' param is the new page number to set the page to, meaning the 'x' part of page 'x' of 'y' (i.e., you probably always want it to be equal to the constant 1UL) and the flag 'bResetTotalPages' is a true/false flag. true resets the y part of page 'x' of 'y', and tabulates automatically for you so you don't have to keep track of the 'y' yourself.

So, after processing an item, say, in a break footer (even if it is invisible), you can call the BSFN that calls:

ubeReport_SetPageNumberEx( pBhvrCom, 1UL, TRUE );

and this should work.

Should this go in "Tips and Traps"?
 
Hi Seg,

[ QUOTE ]
Should this go in "Tips and Traps"?

[/ QUOTE ]

Though it was discussed in the past on the Developers forum, this should go in "Tips and Traps", mainly if you publish/attach the BSFN sources and its documentation in an other post
cool.gif


Regards,

Zoltán
 
Back
Top