jeremey_garcia
VIP Member
Good day,
I am trying to get some running totals to work and I am running into issues. Please see the snippet below, as I know I am missing something simple here.
declared:
<?xdoxslt:set_variable($_XDOCTX, 'HoursTotal', 0)?>
<?xdoxslt:set_variable($_XDOCTX, 'GrossTotal', 0)?>
accumulation:
<?xdoxslt:set_variable($_XDOCTX, 'HoursTotal', xdoxslt:get_variable($_XDOCTX, 'HoursTotal') + 1)?>
<?xdoxslt:set_variable($_XDOCTX, 'GrossTotal', xdoxslt:get_variable($_XDOCTX, 'GrossTotal') + 1)?>
display
<?xdoxslt:get_variable($_XDOCTX, 'HoursTotal'?>
<?xdoxslt:get_variable($_XDOCTX, 'GrossTotal'?>
This is just a basic test as I am unable to get it to work using the variables from the XML. Even with this test, I am not getting the number '1' to show on the pdf. Can someone point me to what I am doing incorrectly?
I tried using the example in:
http://www.jdelist.com/vb4/showthread.php/50401-Adding-Conditional-fields-for-Total-in-rtf
and it didn't work.
Thanks!
I am trying to get some running totals to work and I am running into issues. Please see the snippet below, as I know I am missing something simple here.
declared:
<?xdoxslt:set_variable($_XDOCTX, 'HoursTotal', 0)?>
<?xdoxslt:set_variable($_XDOCTX, 'GrossTotal', 0)?>
accumulation:
<?xdoxslt:set_variable($_XDOCTX, 'HoursTotal', xdoxslt:get_variable($_XDOCTX, 'HoursTotal') + 1)?>
<?xdoxslt:set_variable($_XDOCTX, 'GrossTotal', xdoxslt:get_variable($_XDOCTX, 'GrossTotal') + 1)?>
display
<?xdoxslt:get_variable($_XDOCTX, 'HoursTotal'?>
<?xdoxslt:get_variable($_XDOCTX, 'GrossTotal'?>
This is just a basic test as I am unable to get it to work using the variables from the XML. Even with this test, I am not getting the number '1' to show on the pdf. Can someone point me to what I am doing incorrectly?
I tried using the example in:
http://www.jdelist.com/vb4/showthread.php/50401-Adding-Conditional-fields-for-Total-in-rtf
and it didn't work.
Thanks!