Removing the unintended line feed before CLOB fields in BI Publisher output

Oracle BI Publisher supports the ability to include CLOB data types in the data models (referred to as Data Templates in PRIMO). This is a useful feature that allows Narratives and other "long" fields to be included in your BI Publisher output.

However, BI Publisher automatically inserts a Line Feed character into the data that is presented to the Layout Template. This line feed is clearly evident in the XML output from BI Publisher. This can cause issues in output formatting and undesirable blank rows in Excel output.

To overcome this, the linefeed character needs to be removed as part of the Layout Template. This is easily accomplished using XSL FO substr function. Instead of using a simple tag for the CLOB field (for example <?NARRATIVE_TEXT_EVT?>), invoke the XSL FO function using the following syntax: 


The substr function "removes" the first character by starting the value at position 2.

Using the standard tag (<?NARRATIVE_TEXT_EVT?>) will produce:



This is my narrative text...


Whereas including the substring function  (<?xdofx:substr(NARRATIVE_TEXT_EVT,2)?>) will produce the output without the unexpected linefeed:


This is my narrative text...

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk