(RTF Template) Select an image based on an XML substring condition
I am working to update an existing Unifier Custom Report with a dynamic logo. I have two separate .png files and nine conditions to apply them to.
The following works fine for text distinctions:
<?template:LogoSelect?>
<?xdofx: if substr(XML_ELEMENT_NAME,1,5)=’cond1’ then ’result1’ end if?>
<?xdofx: if substr(XML_ELEMENT_NAME,1,5)=’cond2’ then ’result1’ end if?>
<?xdofx: if substr(XML_ELEMENT_NAME,1,5)=’cond3’ then ‘result2’ end if?>
<?xdofx: if substr(XML_ELEMENT_NAME,1,5)=’cond4’ then ‘result3’ end if?>
<?xdofx: if substr(XML_ELEMENT_NAME,1,5)=’cond5’ then ‘result4’ end if?>
<?xdofx: if substr(XML_ELEMENT_NAME,1,5)=’cond6’ then ‘result5’ end if?>