Monday 28 April 2014

Page Structure in RTF templates Headers Footers and Continued on next page

One issue that has come up recently  was adding some structure to our BI Publisher  templates .  adding headers and footers to them  and  the ability to display different headers and footer depending of  we are on the first middle or last pages of a report .  that initially caused quite a bit of head scratching until I discovered a couple of trick that solved all my problems

firstly stay away from the header and footer sections in word  I had a go with these initially but there not reliable if they work at all.  the solution turned out to be just a couple of XML tags

<?call-Template: PageHeadder?>
     <?start:body?>
               Do report Body Stuff in  here    
    <?end body?>
<?call-Template: PageFooter?>

where PageHeadder and PageFooter were a couple of sub templates I had created earlier .  works lovely every time 

Now what do you do if you want a different header for the first and last pages  or if you want the middle pages to print Continued at the bottom ?

well it turns out that this is quite a common question asked on the interwebz and seems to have a nice elegant solution  the excellent chaps over at the never name it blog have put this together Never Name it Blog Page Structure

and because it seems to be a question asked a lot  they put this excellent guide together too for those anoying times where you want reports to print continued on next page on every page apart from the last one Last Page Continues


Thursday 17 April 2014

a very handy BI Publisher Gotya's Page

while furtiling round the intertubes to try and find a solution to a particularly annoying sub template issue (I'll post more details when i get a solution ) I've come across this very helpful blog post  with a lovely list of  fiddly bits and got-ya's  that i think is going co come in very usefull

http://everythingoracle.com/obip11dmbug.htm

Tuesday 1 April 2014

BI Publisher Handy snippets for checking if feilds exist and are populated

I found this when lurking about the interwebs looking for  a way to check if a field existed in the XML


• To define behavior when the element is present and the value is not null, use the following:
<?if:element_name!=?> desired behavior when the element exists and is not null <?end if?>
• To define behavior when the element is present, but is null, use the following:
<?if:element_name and element_name="?> desired behavior when the element exists but value is null <?end if?>
• To define behavior when the element is not present, use the following:
<?if:not(element_name)?> desired behavior when the element is not present <?end if?>