Home > Software engineering >  How to put 0 instead of blank in rtf template
How to put 0 instead of blank in rtf template

Time:12-30

see sample report output with blank fields

I tried this code see imagethis is the code I used But the 0 was added to the end of each values. See the image below it's looks like this

CodePudding user response:

To me, the simplest way to do that is to use NVL function in query that populates the report, e.g.

select nvl(that_value, 0) as value
from ...

which means that it'll return value (if it exists) or 0 (if value doesn't exist).

CodePudding user response:

Try one of these:

<?xdofx:if your_element!='' then your_element else 0 end if?>

<?xdoxslt:ifelse(your_element!='', your_element, 0)?>
  • Related