Categories
- All Categories
- Oracle Analytics and AI Learning Hub
- 43 Oracle Analytics and AI Sharing Center
- 19 Oracle Analytics and AI Lounge
- 282 Oracle Analytics and AI News
- 59 Oracle Analytics and AI Videos
- 16.3K Oracle Analytics and AI Forums
- 6.4K Oracle Analytics and AI Labs
- Oracle Analytics and AI User Groups
- 108 Oracle Analytics and AI Trainings
- 20 Oracle Analytics and AI Challenge
- Find Partners
- For Partners
BIP - RTF XSLT bisubtraction 2 variables
Summary
BIP - RTF XSLT bisubtraction 2 variables
Content
Hi the community,
In a BI Publisher RTF template it is required to extract 2 variables. The extraction is done through the following statements: <?if:../../Tax_Summary_Lines_Section_S8/Summary_Taxable_Amt_ID8!="0"?> <?if:position()=last()?> <?xdoxslt:set_variable($_XDOCTX,'AllTax',../../Total_Extended_Price_WF_ID23)?> <?xdoxslt:set_variable($_XDOCTX,'Tax',../../Tax_Summary_Lines_Section_S8/Summary_Taxable_Amt_ID8)?> <?xdoxslt:set_variable($_XDOCTX,'NonTax',xdoxslt:get_variable($_XDOCTX,'AllTax - Tax'))?> <?end if?> <?end if?>Q) It is this the proper way to do the substraction <?xdoxslt:set_variable($_XDOCTX,'NonTax',xdoxslt:get_variable($_XDOCTX,'AllTax - Tax'))?> |
Thanks a lot
Answers
-
May i know what is your requirement?
The one which you posted is way of subtraction with some additional logic. there are some easiest way example <?xdofx:2-3?> you can use.
Let us know what exactly you are looking?
0 -
Thanks for your post ...
I try to substract 2 local variables AllTax - Tax calculated in the document
<?xdoxslt:set_variable($_XDOCTX,'AllTax',../../Total_Extended_Price_WF_ID23)?>
<?xdoxslt:set_variable($_XDOCTX,'Tax',../../Tax_Summary_Lines_Section_S8/Summary_Taxable_Amt_ID8)?>
... i tried a lot of thing like this <?xdoxslt:set_variable($_XDOCTX,'NonTax',xdoxslt:get_variable($_XDOCTX,'AllTax' - xdoxslt:get_variable($_XDOCTX,'Tax'))?> or <?xdoxslt:set_variable($_XDOCTX,'NonTax',xdoxslt:get_variable($_XDOCTX,number(AllTax) - number(Tax)))?> or ...
Without any success ....
Best Regards0 -
If I under stand correctly you would like to subtract two XML tag Total_Extended_Price_WF_ID23 and Summary_Taxable_Amt_ID8
we can directly use subtract function like <?xdofx:2-3?> we only need the exact level of these two tags...for that we need to analyse your XML.
Could you please upload your sample XML
0 -
I tried below it worked for me
<?xdofx:Total_Extended_Price_WF_ID23 - Summary_Taxable_Amt_ID8?>
0 -
Check attachment
0