Why am I only getting zeros for a some of my columns?

  • I've got 4 columns which report I'm working on, which basically is supposed to show numeric data. Mostly integer data. This is from an Access report that I've imported into SSRS. Anyway, the weird thing is that 3 of the 4 columns always show just 0, which is frankly wrong (in most cases). The fourth one actually shows reasonable values. The thing that I don't understand is why it's making any difference.

    For example, the report (after being imported into SSRS) has a numeric format of G for all 3 columns that don't work. The fourth column (in this case named quantity on hand) doesn't have any formatting so I removed the formatting from the other 3, but they still only show 0 in the report preview. So then I applied the G format to the quantity on hand, and it still shows reasonable data. The expression for quantity on hand is:

    =Fields!QtyOnHand.Value

    Showing one of the other ones that fails, here's its expression:

    =Fields!StockingLevel.Value

    This shows 0 for all rows.

    I thought that maybe I should try using a ceiling operator (the original report only showed integer values even though the data returned was real) so I used this:

    =Ceiling(Fields!StockingLevel.Value)

    But this still only shows 0 for all rows.

    In looking at the data returned, the values aren't really that large; less than 1000 for all 4 columns of data.

    So what's likely causing this?

    Kindest Regards, Rod Connect with me on LinkedIn.

  • What if you change the formatting to some kind of decimal? If SSRS is rounding behind the scenes and the numbers are less than .5, then they may be rounding down...

    If you add a tablix to your report (for a minute) and drop fields into it, what happens?

  • Can you verify that the query returns non-zero values?

    Are there any expressions on the dataset?

  • Jack Corbett (3/23/2016)


    Can you verify that the query returns non-zero values?

    Are there any expressions on the dataset?

    Yes, I've verified that the query returns non-zero values by running the query with the design view.

    One of the 3 failing fields is an expression, the other two are just the field values.

    Kindest Regards, Rod Connect with me on LinkedIn.

  • I found the problem. I was calculating one of the values wrong.

    Kindest Regards, Rod Connect with me on LinkedIn.

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

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