Null Values in Report

  • Hi,

    I have created a report which returns count of records in 20 columns .Created individual dataset's for each separate column.The query within the dataset does a SELECT count of records based on certain criteria.I have formatted the textbox[where the dataset value is returned on the report], Formatcode to = "##,###" as I wanted the value to be returned in this format, example :- "111,233".

    All was well..till .I had datasets that has 0 value.This value was not returned on the report as "0" but rather just blank.If I were to remove the textbox formatcode of "##,###", 0 is returned.I need to keep the formatcode of "##,###" as that is required by the users and column counts change from time to time, therefore it would be silly to remove formatcode of "##,###" for all those blank values textbox for now.

    Can anyone out there give me a solution for this ?

    Problem is , Iff value of dataset is "0", returned "0" ELSE return the value, while having the formatcode of "##,###"

    I know my Topic is pretty long, but I just wanted to make everyone understand my problem.Thank You in Advance !

    [font="TimesNewRoman"] “I haven't failed, I've found 10,000 ways that don't work”........Thomas Alva Edison[/font]

  • Can you give an example of one of your counts?

    The Count(*) in T-SQL always returns a value, even if 0, so i am curious how you're coming up with your counts.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • My SELECT COUNT(*) does return a "0",when the column has no records.

    Tested in SSRS[data tab] and Mng Studio.

    Problem arises when the value of dataset is displayed in a textbox, where the textbox Properties>Format>Format Code is "##,###".

    [font="TimesNewRoman"] “I haven't failed, I've found 10,000 ways that don't work”........Thomas Alva Edison[/font]

  • Ah - took a second to visualize what you're looking at.

    If you change the format to ###,##0 it won't suppress ALL of the digits if something has a value of 0. 0 represents a non-optional/non-suppressible digit. If you put in ###,000 it would always return 3 digits (even if the first first is 0).

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Thank You Matt....Tried with "###,##0" & works fine....

    Never thought of that:Wow:

    [font="TimesNewRoman"] “I haven't failed, I've found 10,000 ways that don't work”........Thomas Alva Edison[/font]

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply