all groups > sql server reporting services > february 2006 >
You're in the

sql server reporting services

group:

Displaying months with no data



Displaying months with no data bassunddrum NO[at]SPAM gmail.com
2/16/2006 8:44:19 PM
sql server reporting services: Hi all,
Does anyone have any thoughts on hard coding values into a result set
displayed in a grid? I have a dataset that I've built a bunch of grids
from in RS 2005. One of the reports I need to create always needs to
have all of the months of 2006 displayed regardless of whether there's
data. If there's no data for say July 2006, I get the following:
-Thanks!

Completed Programs
January 2006 1
February 2006 2
October 2006 3
November 2006 4
December 2006 233

I need
Completed Programs
January 2006 1
February 2006 2
March 2006 0
April 2006 0
May 2006 0
June 2006 0
July 2006 0
August 2006 0
September 2006 0
October 2006 3
November 2006 4
December 2006 233
RE: Displaying months with no data Amarnath
2/16/2006 9:59:31 PM
Hi,
What ever you want to display through report see that you bring it through
query first. if then try command from reporting server. In your case, from
query you can easily bring 0 value for the month which has no data. If not
then try in your grid
=IIF(<month> Is nothing, 0, month) some thing like this.

Regards
Amarnath

[quoted text, click to view]
Re: Displaying months with no data Craig
2/17/2006 12:00:00 AM
You need to have the values in the dataset somehow, so if you can I would
create a Month table in the database which you can join to to provide the
complete list. If you can't do that then see if you can do a Stored
Procedure, then you can populate a memory table and return that instead.

Craig

[quoted text, click to view]

Re: Displaying months with no data Craig
2/18/2006 12:00:00 AM
If your completely stuck give me your SQL statement and I can add in to it
the extra months using unions.

Craig

[quoted text, click to view]

AddThis Social Bookmark Button