Handling null values in bi publisher rtf template
My requirement is replace all zeros with - sign
<if:<?sum(current-group()/BUDGET)=0?><?'-'?><?endif?> but it throws error
<if:sum(current-group()/BUDGET)=0?><?'-'?><?endif?>
http://www.oracleerpappsguide.com/2014/06/how-to-use-if-else-conditions-in-xml-publisher-rtf-template.html
brajesh,
Syntax is wrong because if budget =0 then it should replace with '-' but its not doing that in my case.
thanks
your syntax is little bit not correct, BI tags should start with <? and these should not be nested tag like <? <?.
Below is the one working for me
<?if: sum(current-group()/BUDGET)=0?><? '-'?><?end if?>
thanks for the help
same condition:
<?if:field_name=''?> - <?end if?> --------if you want to replace null with -
<?if:field_name=''?> '-' <?end if?> ---if you want to replace null with '-'
OR
<?xdofx: nvl(field_name,'-')?> ,
<?xdofx:replace(name,'','-')?>
still if you find issue , upload RTF and XML.
i took care that in sql now my concern is only to replace null values with '-'
You will end up with a datatype issue ... non-ZEROs are numeric and you want to convert ZERO to non-numeric '-' ...
upload rtf and xml , Thanks