Monday 30 January 2017

Applying HTML formatting tags to text feilds

hello world.  I came across a new and interesting issue recently . we have been working on moving some of our sales documents over to BIP from our previous document processing system  and i came up on a realy nasty snag 

we have large comment fields in there where our users wrap text in html formatting tags like < b >  or < u > etc so they can have more control over how the text displays in the finished out put

that gave me a monumental headach but thanks to the BIP elfs over at Oracle we have a solution .  if you adjust your tag name  to match 

<?html2fo: elementname?>  it does the trick nicely and displays the html formatting 

thank you oracle that one really helped out 


Wednesday 6 July 2016

Adding Dynamic Images from a web Service

ok this gave me quite the headache.

i had a task of adding a dynamic 2d barcode to one of my RTF templates using a web service , where i could read a URL in my XML. call the web service and get back a nicely formatted barcode.

I found lots of examples using word 2007 but ofc we were using word 2010 and the methods described didnt work . so after a lot of head scratching , crying and chicken bothering I found the following

in typical Microsoft fashion they have made it a bit more aqward in word 2010 (just to annoy us developers I think).

instead of adding a dummy image to resolve this I needed to 
1. click on the developer tab
2.go to legacy tools and select image Active x control
3. right click on the image and select the alternate text tab
4. enter url:{} and inside the {} enter the absolute path to the tag that holds the URL to where the image was generated from the web service  .

trust Microsoft to make things ten times more difficult :) 

Friday 17 June 2016

Hey BIP People  Please Say a Massive HI to our newest Band1to the fantastic Chandran who is joining us to help share the BIP goodness welcome to  BIP Band1tos Chandran and thank you for your contributions and support

Monday 29 June 2015

Adding Incramenting line numbers to a document

I've not had to do much  with our BIP documents recently hense the lack of posts but I got hit with quite a nasty gotcha this morning that I thought I would share.  we have a purchase order document  that is designed to run on JDE data using document number as its primary key.  unfortunately one of our plants (theres always one ) decided that they wanted to run there purchase orders over a range of date criteria instead. and produce one consolidated purchase order.   the problem this produced is the line numbers  all went out of whack as each purchase order appeared separately. so for example if they were trying to consolidate 3 purchase orders one that had 2 lines and one with 3, my line numbers would suddenly change to 1,2,1,2,3  and not 1,2,3,4,5 . grrrrrrrrrrr . I didn't want to have to re write my templates or my jde report so I found the solution with a bit of  googling

first up I set up a variable to hold my ine number at the very top of my document using
<?xdoxslt:set_variable($_XDOCTX, 'COUNTER', 1)?>

luckily im using a for each loop to cycle round my detail lines  so I replaced the field I was using to display line number from the xml  with
<?xdoxslt:get_variable($_XDOCTX, 'COUNTER')?>

and lastly just before the end on my for each loop I incremented my counter using
<?xdoxslt:set_variable($_XDOCTX, 'COUNTER', xdoxslt:get_variable($_XDOCTX, 'COUNTER') + 1)?>


job done :)


Friday 27 June 2014

Check a field exists in the XML with BI Publisher

this turned in to a bit of a GOTYA!  we had an interesting issue where mike was using a language field to control how a field looked on the page.  the trouble was we occasionally got crap data where the language field had not been populated  and the default section in a choose statement wasn't firing

the solution turned out to be

<?if:not(element_name)?> desired behavior when the element is not present <?end if?>
 which fixed the problem nicely  thank you google we love you !!!!!!!

Tuesday 6 May 2014

formatting number fields

a big thank you to Mike for finding this  here is a very useful blog posting on formatting number fields  which dosent seem to work quite as well as it should in word when designing rtf templates Number Formatting Linky

Thursday 1 May 2014

BI Publisher Date functions

Big Shout out to Jamie on this one :)   I hadn't really had to look for these before but as well as the Date field in the properties bit of the XML which i think shows the date the XML is created   there's also this cracking list of  Date functions out there that i think are going to come in really reallyBIP Date Functions Type Linky !!! useful