Dynamic Conditional Logos in BI Publisher RTF template

Sometimes you need to add logos conditionally in a BIP report. The reason for adding dynamic conditional logos in BI Publisher can be for example :

A Company has different child companies and each of them has a different brand and logo, and based on the organization selected you may need to change the logo at runtime.

This is achieved using concept of sub template. Observer the code below

The syntax for dynamic logo in rtf template

To insert conditional image in xml publisher report we can use choose when condition directly in BI publisher RTF by writingย <?choose:?>ย conditionย <?end choose?>

<?choose:?>
<?when:1!=1?> <?call: logo1?> <?end when?>
<?when:1!=2?> <?call: logo2?> <?end when?>
<?otherwise:?> <?call:logo1?> <?end otherwise?>
<?end choose?>


<?template:logo1?>

insert you logo image 1 here

<?end logo1?>
<?template:logo2?>

insert you logo image 2 here
<?end logo2?>

image Dynamic Conditional Logos in BI Publisher RTF 1

The Output

Since in the code above the 2nd when condition 1!=2 is true the google image is shown

image 1 Dynamic Conditional Logos in BI Publisher RTF 2

you can similarly add multiple when contidions with images.

Make sure to add the subtemplates codes and the end of the report else the report data may not be displayed espeially when the last condition is true.

Incase you have more than 4 or 5 logos to add , your rtf file may become heavy in size. In that case you can place a dummy image and in the format section point to the logo file in file system in the when conditions block.

Recommended post

Variables in BI Publisher RTF template

Bursting in Fusion BIP

more on Fusion apps tech

wpsbutton
We will be happy to hear your thoughts

Leave a reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO
Cloud Technologies Blog
Logo
Compare items
  • Total (0)
Compare
0
Shopping cart