web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Print blank when the value is zero in RTC Reports

Suresh Kulla Profile Picture Suresh Kulla 50,243 Super User 2025 Season 2

Sometimes when we are printing decimals/integer fields in the RTC report we don’t want to display zero if the value of the expression is zero, but rather display it as blank,  most of the standard Navision Reports has this logic built in.

For example check this below order confirmation report, the second line unit price is set to zero on the order and it did not print zero but rather printed as blank


image

How did they do this ?

On the RTC Report they created a new function called BlankZero and the function looks like this

[code]

Public Function BlankZero(ByVal Value As Decimal)
     if Value = 0 then
         Return ""
     end if
     Return Value
End Function

[/code]

The function takes a decimal and if the value is zero it returns blank text string.

So for the above example to display unit price it uses the following expression

=Code.BlankZero(Fields!UnitPriceToPrint.Value)

If you need to display blank please use the above function in your textbox expression

Please leave your comments, feedback or any suggestions you have for me to improve my blog and also if you have any questions, feel free to post.


This was originally posted here.

Comments

*This post is locked for comments