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


No comments:

Post a Comment