BI Publisher (MOSC)

MOSC Banner

Variable Declaration in XML Template

edited Aug 21, 2009 2:37AM in BI Publisher (MOSC) 1 commentAnswered
 Hi,

I want to get the total page count in a report. The word field { NUMPAGES } gives the value but this value cannot be used in any of the calculations neither its value can be assigned to a variable.

We have declared a variable in the header template and are incrementing it for each header display with the following syntax.

<?xdoxslt:set_variable($_XDOCTX, 'pagecount',xdoxslt:get_variable($_XDOCTX, 'pagecount')+1)?>

However to get this working properly 'pagecount' should be initialized to 0 before this with the following syntax.

<?xdoxslt:set_variable($_XDOCTX, 'pagecount',0)?>

If we declare this in the header each time the header is displayed this variable resets to '0' and the pagecount increments only to 1.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center