Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Display format question

edited April 2005 in General
I have a numeric column in which I'd like to represent nulls as 0. I'm using
the following display format 0.### but I'm still getting blank spaces
instead of a 0. Is there something else I need to do?

Comments

  • edited April 2005
    Hi Preston,

    By default, a null field will just print blank. Try using the OnGetText to
    check if the field value is null, then printing a "0" if it is.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2005
    Isn't that a bug?
  • edited April 2005
    Hi Preston,

    No, this is simply the way ReportBuilder works :). Null values are one of
    the most difficult items to handle so we decided to leave it up to the
    developer how they would like them displayed. The entered display format is
    not even taken into account when there is nothing to format.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2005
    I don't mind setting the OnGetText method, I just hate to do it for every
    field every time I write a report. The alternative is to modify my db
    queries so that they check for nulls and return 0 instead. Again, though
    that's for every field. I feel like I'm losing the benefit of having a
    dataware field.

    I understand why you did what you did, but it sure would be nice if there
    were a more elegant solution. There is a "Blank when zero" option (which BTW
    is not in the help file) so maybe a "Zero when NULL" option would help.
    Maybe even a "Apply display format to null values" would apply. I realize
    there's nothing to format, but the literals would show.
  • edited April 2005
    Thanks for the suggestion. I will add this to the list for possible
    enhancements.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.