Monday, March 12, 2012

Placeholder Question...Simple (I think)

OK...all you gurus of SSRS I have a question that I think is simple but who knows...I have asked other questions that I thought were simple and it turned out it is very hard or impossible to do in SSRS 2005 version that I have.

Question: I have a Matix report that has a start date and an enddate parameter (among others). I need to do the following:

* Need to fill all columns that have no data with a value of zero

How in the world do you do this in Reporting Services 2005?

HELP!!!!

You could build this into your expression in your report using IIf() and IsNull() similar to the following:

IIf(IsNull(Fields!myfield.value), 0, Fields!myfield.value)

OR

You could build it into your SQL query similar to the following:

SELECT CASE WHEN IsNull(MyField) THEN 0 ELSE MyField END AS MyField FROM MYTABLE WHERE ......

|||

If I do this in SSRS...how do I nest a sum function?

Sum(Fields!Responses.Value)

|||

I would think you could do this:

=IIf(IsNull(Sum(Fields!myfield.value)), 0, Sum(Fields!myfield.value))

That is assuming that the value of the sum is in fact null.

|||Thank You!!!

|||You're welcome.

No comments:

Post a Comment