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?>
The Output
Since in the code above the 2nd when condition 1!=2 is true the google image is shown
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.
Recommended post
Variables in BI Publisher RTF template
more on Fusion apps tech