Monday, August 17, 2020

Dynamically Changing Layout Sizes

If you want to dynamically change layout sizes for example you need legal size and sometimes you need letter size.

It is very simple to do.  In MS Word, you create a section break every time you have a different layout size.  In the example below there will two sections, one for legal and one for letter size.  In each section you code it like this:

<?if@section:P_SIZE='LEGAL'?>
<< ---- y o u r  l e g a l  s i z e   l a y o u t ---->>
<?end if?>


<?if@section:P_SIZE='LETTER'?>

<< ---- y o u r  l e t t e r  s i z e   l a y o u t ---->>

<?end if?>

Understand that the coding above resides in the respective section.   P_SIZE is a parameter defined in the data model but it could be anything.

I want to give credit to Vishal Pathak for posting this on his blog.


Tuesday, May 19, 2020

Dynamically Changing Font and Font Attributes


In the XDOUserGuide there is a section of Supported XSL-FO Elements (D1).  The section does not have any examples of how to use them.

I have created an example on how you may go about dynamically change the size of a font.

First I created a parameter called "fsize" to simulate varying the font size:

<?param@begin:fsize;string('20pt')?>


Below is the code that I will use.  It is mandatory that everything you see below is to go into a form field.


<fo:inline font-family="Arial" font-size="{$fsize}" font-weight="bold" font-style="italic"   hyphenate="yes "text-align="center">Now is the time for all good men to come to the aide of their comrades.</fo:inline>

The tricky part was to introduce the variable (fsize) into the markup. You have to encapsulate the variable with "{var}". Note that param's are referenced with a prefix of "$".



Wednesday, January 29, 2020

xdo.XDOException When Using subtemplate from Desktop


Apparently Oracle put a new hook in when viewing a report from the BI Publisher desktop preventing the import and throwing an error.

You can read about Subtemplates Failing? in Tim Dexter's blog.

The fix worked for me by reading the blog on Learn Oracle Applications Tech-Stack.

If you want to cut to the chase then it is a matter of making a modification to the xdo.cfg file. On my installation that file did not exist but there was a file called xdo example.cfg file.

Here are the steps I took to make the modifications:


  1. I right-clicked on the Notepad icon and chose "Run as administrator".  I had to do this because of the security in the folder hierarchy, I couldn't save it otherwise.
  2. I opened C:\Program Files (x86)\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\config example.cfg
  3. I added this line: <property name="xdk-secure-io-mode">false</property>
  4. I saved the file in the same location calling it xdo.cfg

You should be good to go!!