Categories
Handling null values in bi publisher rtf template

Summary
Handling null values in bi publisher rtf template
Content
My requirement is replace all zeros with - sign
<if:<?sum(current-group()/BUDGET)=0?><?'-'?><?endif?> but it throws error
Answers
-
<if:sum(current-group()/BUDGET)=0?><?'-'?><?endif?>
0 -
brajesh,
Syntax is wrong because if budget =0 then it should replace with '-' but its not doing that in my case.
thanks
0 -
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?>
0 -
thanks for the help
0 -
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,'-')?> ,
OR
<?xdofx:replace(name,'','-')?>
still if you find issue , upload RTF and XML.
0 -
i took care that in sql now my concern is only to replace null values with '-'
0 -
You will end up with a datatype issue ... non-ZEROs are numeric and you want to convert ZERO to non-numeric '-' ...
0 -
upload rtf and xml , Thanks
0