UBE Page Number (an old thread revived.....)

Frosty the Coder

Legendary Poster
List,

I'm looking to accomplish the (dreaded) page X of Y, with Y being reset
per document (in this case, PICKSLIPS in XE, sp13).

I found this thread, (Jane, Larry, Sunil, and (of course) Zoltan),
from april/may 2001, via the forum search. Regretably, it concluded
w/"the need to do more experimenting" as to resetting Y w/in a
single order (_not_ for the entire report). I also checked the KG, but
didn't see anything helpful.

Has anyone found the resolution to this? Further, is there a way to
do it w/OUT creating a C bsfn to call the JDE API's? I'm an rpg-asaurus,
feeling my age, and limited to using ER.....

Any all help is appreciated.

TIA

Gene



Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
AS/400, B733, SP14, W2000 client
XE, SP13
 
Gene,

in my testing and playing around with this, resetting the total number of pages applied to ALL the pages in the .pdf file generated - I couldn't get multiple documents of 2, 3, etc. pages each inside one .pdf to have the desired value.

If you want it badly enough I think the best way is to have a controlling UBE that spawns the UBE generating the document. In other words the controlling UBE processes the view, for each document found it runs another UBE and passes to it the document number to generate. Use the new XE "Page 1 of *" function in that UBE to get your effect.

Regards,

Larry Jones
[email protected]
OneWorld B733.1, SP 11.3
HPUX 11, Oracle SE 8.1.6
SandBox: OneWorld XE SP15.1
 
Larry -

Thanks for confirming what the original thread had led me to believe.

I appreciate your help.

Gene



Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
AS/400, B733, SP14, W2000 client
XE, SP13
 
Hi Gene,

I have used this API written in a BSFN to reset the no. of pages for every Invoice break in the customised Invoice Print Program R5542565. The Pages #'s are displayed only in the Page Header or Page Footer. The following code illustrates the point

In the Do Section Event of the Page Header
-----------------------------------
If VA rpt_cFlag is equal to "Y"
Reset the Page Number and Page Total
End If
VA rpt_cFlag = "N"

In the Before Level Break Event of the Detail Line 1 Section.
-----------------------------------------------------------
If BC Document (Voucher, Invoice, etc )is not equal to PC Document (Voucher, Invoice, etc )
VA rpt_cFlag = "Y"
End If

The flag is used to control when to reset the Page Total which is in our case at every Invoice # change.

I hope this helps

Regards
Sunil
 
Sunil,

can you please share with us:

1) Your OW Configuration / Version
2) The source file/object for the BSFN "Reset the Page Number and Page Total"

I cannot find any such object in my XE install. Is it custom to your site?

Thx,

Larry Jones
[email protected]
OneWorld XE, SP 15.1
HPUX 11, Oracle SE 8.1.6
Mfg, Distribution, Financials
 
Larry,

It is a Custom BSFN i created using the JDE API


where lpDS->nnumberPage is the starting Page #
Ideally 1.
lpDS->cBoolean is whether u want to reset Page Total.
Ideally '1' to reset the Page Total

Regards
Sunil
 
He won't say; maybe because it's custom/proprietary/secret/ blah, whatever!
Let me try it:
Sunil, will you be so kind and enlighten us with the source code, please? Thank you!

LIVE: B732.1 SP12.2, Oracle 806, FormScape 2.1
SANDBOX: Xe SP15 & Update1, Oracle 8i
RS/6000, Citrix
 
Hi Adrian/Larry,

Was busy for a few days and hence could not reply. There is nothing secret
about it. The API is as follows


where lpDS->nnumberPage is the starting Page #
Ideally 1.
Ideally '1' to reset the Page Total

Regards
Sunil
 
Hi,

I am sorry the API seems to get blanked out. I have tried sending the name 3
times. I will type again. It is

ubeReport_SetPageNumberEx(lpBhvrCom,mnPageNumber,Boolean)

The Parameters are
Page Number = 1
Boolean = '1'

Regards
Sunil
 
Sunil,

OK, this is the same API you originally posted over a couple months ago. When I tested it then, and again just now, my results were that yes the Page number gets reset to 1, but the change to the Total Number of pages affected all pages in the PDF document. Can you please confirm that total number of pages are not affected in same manner for you?

Thx,

Larry Jones
[email protected]
OneWorld XE, SP 15.1
HPUX 11, Oracle SE 8.1.6
Mfg, Distribution, Financials
 
Larry,

At my client they wanted to reset the Page Total at every Invoice Number
Change. I called the Business Function for resetting the page # in the Page
Header only if a Flag was defined as yes. The Flag was set to yes in the
Before Level Break Section of the main Section if Current Invoice # was not
equal to Previous Invoice #. The Page # gets reset only on Level Breaks
which in my case is Invoice #. And it suits the clients requirements in my
case.
I hope this clarifies. I have also posted the ER Code in my previous
replies.

Sunil
 
Sunil,

So the Invoice Print ER (modified)
calls the _custom_ (C?) bsfn "Reset the Page Number and Page Total",
which calls the JDE API
"ubeReport_SetPageNumberEx(lpBhvrCom,mnPageNumber,Boolean)"?

Are there 3 parms on that API: lpBhvrCom, mnPageNumber, and Boolean?

Where does the lpDS->nnumberPage (mentioned in a diff message)
come into play?

Can API's only be accessed via BSFNs (as opposed to ER and/or NER)?

TIA for the clarification (keep in mind, I'm an RPGasaurus.....)

Gene



Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
AS/400, B733, SP14, W2000 client
XE, SP13
 
Gene,

The lpDS->nnumberPage mentioned in the previous mail is just an example of a
code. It represents where you want to start the Page Number. e.g For most of
the cases it is 1.
The API can be only called thru' a C BSFN. And yes there are 3 parameters
in the API.

Sunil
 
Hi Gene,

If the requirement is to reset the page number after
change in value of a field (for example Invoice
number), there is a JDE BSFN to handle this.

B9800580 Set Report Page Number

This function will set or get the current report page
number.

Parameter Value
--------------------------------------------------
Action Code: 'I' or '4' - Retrieve current page #
'C' or '2' - Change current page #
(others) - Invalid

In addition to the above, you have to either send or
get the page number.
--------------------------------------------------

Hope this will help you.

Regards,
Kannan Babu
OW Xe SP(13) Windows 2000 MSSQL

--- gpiekarski <[email protected]> wrote:
"ubeReport_SetPageNumberEx(lpBhvrCom,mnPageNumber,Boolean)"?
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=0&Board=OWDEV&Number=15372


__________________________________________________
 
Back
Top