I wish to show/hide some labels/fields depending on if current page is the last one in report (for example, show SUBTOTAL label from 1 to n-1 pages, and TOTAL label in last page).
as an example, I wish to get something like this
FUNCTION SUBTOTALFORMATTRIGGER RETURN BOOLEAN IS
BEGIN
IF :TOTAL_REP_PAGES = 1 THEN
RETURN (FALSE);
ELSE
IF :CURRENT_PAGE_NUM = :TOTAL_REP_PAGES THEN
RETURN (FALSE);
ELSE
RETURN (TRUE);
END IF;
END IF;
END;
I was able to place two fields in report, showing the current page number and the total pages number (Source: page number/total pages). They works at runtime, but I cant get to use them in triggers (error ":TOTAL_REP_PAGES" is not defined).
I also tried to use SRW.GET_VALUE('TOTAL_REP_PAGES'), but I get an error message at runtime REP-1440: an unknown column name was passed to SRW.GET_VALUE in program unit SUBTOTALFORMATTRIGGER.
How can I use page number values in triggers?