Home » Developer & Programmer » Reports & Discoverer » how to get total number of pages in format triggers (oracle reports builder 12.2.1.3.0)
how to get total number of pages in format triggers [message #685953] Fri, 06 May 2022 03:59 Go to next message
calacausi
Messages: 23
Registered: March 2012
Junior Member
I wish to show/hide some labels and fields depending on if the current report page is the last one (ie: show a "subtotal" label from page 1 to n-1, and "total" label at page n, the last one).
I know current page can be get using SRW.GET_PAGE_NUM; I also know that I can bind a numeric field to current page and total pages number (Property inspector. Source: page number/total pages). But I could not be able to use them in format triggers.
I created F_CURR_PAGE and F_TOT_PAGES fields, and they show current page and total report pages number.

/forum/fa/14619/0/

If I use them into a format trigger (ie: IF F_CURR_PAGE < F_TOT_PAGES THEN...) I got "identifier F_CURR_PAGE must be declared". how can I use theese parameters into format trigger?
thanks
  • Attachment: rep_pages.png
    (Size: 36.09KB, Downloaded 5190 times)

[Updated on: Fri, 06 May 2022 04:19]

Report message to a moderator

Re: how to get total number of pages in format triggers [message #685960 is a reply to message #685953] Tue, 10 May 2022 14:27 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Fields are referenced with a colon sign in front of their names, e.g.
IF :F_CURR_PAGE < :F_TOT_PAGES THEN...
Re: how to get total number of pages in format triggers [message #685967 is a reply to message #685960] Wed, 11 May 2022 02:30 Go to previous messageGo to next message
calacausi
Messages: 23
Registered: March 2012
Junior Member
Littlefoot wrote on Tue, 10 May 2022 21:27
Fields are referenced with a colon sign in front of their names, e.g.
IF :F_CURR_PAGE < :F_TOT_PAGES THEN...
I tried it, getting error "REP-0730: the bind variable is not defined" (see pic)

/forum/fa/14620/0/
  • Attachment: report2.png
    (Size: 74.96KB, Downloaded 5122 times)

[Updated on: Wed, 11 May 2022 02:41]

Report message to a moderator

Re: how to get total number of pages in format triggers [message #685975 is a reply to message #685967] Wed, 11 May 2022 15:02 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Where exactly did you create F_CURR_PAGE and F_TOT_PAGES? In Data Model Editor? If not (but in Paper Layout Editor), try to do so.
Re: how to get total number of pages in format triggers [message #685976 is a reply to message #685975] Thu, 12 May 2022 03:18 Go to previous messageGo to next message
calacausi
Messages: 23
Registered: March 2012
Junior Member
Littlefoot wrote on Wed, 11 May 2022 22:02
Where exactly did you create F_CURR_PAGE and F_TOT_PAGES? In Data Model Editor? If not (but in Paper Layout Editor), try to do so.
I created fields in layout editor. I dont know if it is possible to create them in data model (I think they should be formulas, but I dont know how should they be calculated)
Re: how to get total number of pages in format triggers [message #685981 is a reply to message #685976] Wed, 18 May 2022 01:05 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
(Sorry for being late.)

You're right, it seems you can't create it in Data Model editor. I don't have other ideas, unfortunately.
Previous Topic: Report background Engine stop work when print to pdf
Next Topic: REP-3335 Error
Goto Forum:
  


Current Time: Tue Dec 03 11:49:13 CST 2024