Sometimes have a requirement to run the running total in XMLP Report and set the record per page by Variable declaration.
Step to follow,
- Add the form field in RTF and add below code in the form field.
- Make sure Variable outside the loop.
- Add the code in the form field.
<?xdoxslt:set_variable($_XDOCTX, ‘counter’, 0)?>
<?xdoxslt:set_variable($_XDOCTX, ‘lines_page’, 4)?>
<?xdoxslt:set_variable($_XDOCTX, ‘tot_lines’, count(.//G_SLNO))?>
<?xdoxslt:set_variable($_XDOCTX,’remainder’,0)?>
- call the below code in form field before end the loop (Inside the loop)
xslt:get_variable($_XDOCTX, ‘lines_page’) <= 0?><?call:breaking?><?end if?><?end if?>
- For taking Running total, use below code.
- Make sure Variable outside the loop.
- Add the code in the form field.
<?xdoxslt:set_variable($_XDOCTX, ‘counter’, 0)?>
- call the below code in form field before end the loop (Inside the loop)
xslt:get_variable($_XDOCTX, counter + <ColumnName>) <?end if?>
Thank You.
Recent Posts