Showing posts with label Substring. Show all posts
Showing posts with label Substring. Show all posts

Wednesday, 19 March 2014

BI Publisher Storeing a substring of an XML tag into a variable

this gave me a bit of  a headache  I had a task where i needed to chop of the last  character of one of the XML tags so I could use it in some of the logic statements  further down in the code  .  this did the trick  OptioPrinterName_ID180  is the name of the XML tag i wanted to chop the end off and store  and 1 at the end  is the number of characters to chop


<?xdoxslt:set_variable($_XDOCTX, ‘optioChar’,xdoxslt:right(OptioPrinterName_ID180,1))?> 

 Then further down in the code when i needed  to reference the variable for my logic  i Referenced it as follows


<?choose:?>
         <?when:xdoxslt:get_variable($_XDOCTX, ‘optioChar’)=‘A‘?>Test<?end when?>
           <?otherwise:?>Test2<?end otherwise?>
<?end choose?>

Tuesday, 18 March 2014

Extended Function Support in RTF templates BI Publisher

ok while hunting round the interwebz for a way of taking a date and turning it into a sub string a character at a time  (don't ask its a finance report thing  SHUDDER !)  I stumbled across this incredibly cool Oracle document  that shows loads of SQL , XSL, and FO elements and functions and how to do them in BI Publisher  well cool and extremely Useful  thank you Oracle   thank you Oracle Techno Pixies :)


extremely cool  and useful Linky