Calculation In Bip

Post from Sudeep[i guess i knew this guy :)],
If i have this xml

<ROOT>
<T>
<A1>10</A1>
<B1>5</B1>
</T>
<T>
<A1>10</A1>
<B1>5</B1>
</T>
<T>
<A1>10</A1>
<B1>5</B1>
</T>
</ROOT>

i am using this xsl ,


<?sum(T /A1)?>
<?sum(T/B1)?>
<?xdoxslt:set_variable($_XDOCTX, ‘TEST’,0)?>
<?for-each:T?>
<? A1*B1?>
<?xdoxslt:set_variable($_XDOCTX, ‘TEST’, xdoxslt:get_variable($_XDOCTX, 'TEST')+(A1*B1))?>
<?end for-each?>
<? xdoxslt:get_variable($_XDOCTX, 'TEST')?>


which will return me the

30
15
50
50
50
150

Got some thanks :) from sudeep too.

Comments

Popular posts from this blog

BIP Formatting

Repeat Table Header in all pages in BIP

Limit rows per page