Sunday, March 11, 2012

Displaying months with no data

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 233Hi,
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
"bassunddrum@.gmail.com" wrote:
> 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
>|||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
<bassunddrum@.gmail.com> wrote in message
news:1140151459.214316.219040@.o13g2000cwo.googlegroups.com...
> 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
>|||If your completely stuck give me your SQL statement and I can add in to it
the extra months using unions.
Craig
"Craig" <craigm_richardson@.hotmail.com> wrote in message
news:%23tHX4u4MGHA.916@.TK2MSFTNGP10.phx.gbl...
> 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
> <bassunddrum@.gmail.com> wrote in message
> news:1140151459.214316.219040@.o13g2000cwo.googlegroups.com...
>> 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
>

No comments:

Post a Comment