Re: Oracle report2.5 question

From: Ian Baird <i.baird_at_btinternet.com>
Date: Thu, 19 Nov 1998 17:30:39 -0000
Message-ID: <731kit$ar1$1_at_plutonium.btinternet.com>


I don't think you can do this as Oracle decided not to let us mortals use the &Total_Pages in the format trigger?

You have to do a bit of a bodge ......

Create a package variable of type integer or number so that the value is retained for the life of the session.

Create a procedure or function to increment the variable by one when called.

On a layout object that only appears once on the layout call the procedure/function from the format trigger (don't forget an exception handler just incase!).

Place a boiler plate of 'XXX' over the top of the page number and write a format trigger that :

retrieves the value of the package variable ; then compares it will 999, returning FALSE if <= 999 and TRUE if >999.

Any other ideas from the group would be most welcome.

Ian.

Raymond Siao wrote in message <365383CA.D66AEA38_at_tmsw.com>...
>I think you could use the Format Trigger of the page no. field to format
>your output. It's simpler.
>
>Liren Zhang wrote:
>
>> I have a report that need me to print page numbers as 'Page xxx of xxx'.
>> If page number is greater than 999, print 'XXX'. So is the total page
>> number.
>> I was thinking about using a formula to do it. But I don't know how to
>> get the total page number source and use it in the formula.
>>
>> Please give me some good ideas. Thanks much in advance.
>>
>> Lee
>
Received on Thu Nov 19 1998 - 18:30:39 CET

Original text of this message