Showing posts with label section. Show all posts
Showing posts with label section. Show all posts

Friday, March 30, 2012

replacing Null values with 0's in Matrix

Hi,

I am newbie to reporting services and I need some help. Could any one please let me know how to replace Null value with 0 in the data section of the Matrix. I don't want blanks to be displayed on the report, I want those to be replaced with 0's.

Thanks for your time.

Use this expression:

IIf(Fields!YourField.Value = Nothing Or IsNothing(Fields!YourField.Value), 0, Fields!YourField.Value)

Shyam

|||Or you can get rid of the nulls at data level by using a coalesce or IfNull function on the field in the select statement.|||

Thanks a lot guys for the reply.

Sluggy, I did try to use the coaslesceempty or the isempty function to replace the null's with 0's at the data level. But somehow in reporting services when it rolls up a value containing null's it displays '#Error' in the preview tab although in the data tab it gives proper results. But it works perfectly on the analysis services browser and also in Excel. Any idea why the '#Error" occours in Reporting services. the code i am using is

Case

When IsEmpty([Measures].[Account Count])
Then Null

Else
COALESCEEMPTY(([Measures].[Debtor Count],
[Account].[Account Close Flag].&[False]), 0)
End

Thanks.

|||

RS will typically show #Error when you try to do an aggregate function on a list (or item) of data that contains a NULL, and i see with your IsEmpty statement you are setting it to null - set to zero instead.

Monday, March 12, 2012

Repeating headers on subreports

I have three subreports that are sitting in the detail section of a grouped
table. I pass in the appropriate parameters and everything is working well
with the subreports in terms of the data. I have created a group header for
the subreports and turned on the repeat on new page option. This is the area
that is causing me grief. The group header shows up on the first page fine,
but if the subreport spills over to another page, the group header is not
repeated. Is this because The subreport technically only occupies one row of
the table?I would suspect that is the case, since you wouldn't normally expect a
single table row to span multiple pages...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Clark Kent" <ClarkKent@.discussions.microsoft.com> wrote in message
news:BFDFA52D-315E-448A-A30D-44FD18B3EB96@.microsoft.com...
>I have three subreports that are sitting in the detail section of a grouped
> table. I pass in the appropriate parameters and everything is working well
> with the subreports in terms of the data. I have created a group header
> for
> the subreports and turned on the repeat on new page option. This is the
> area
> that is causing me grief. The group header shows up on the first page
> fine,
> but if the subreport spills over to another page, the group header is not
> repeated. Is this because The subreport technically only occupies one row
> of
> the table?

Friday, March 9, 2012

Repeat details section if

Is there a way to make the details section repeat depending on the quantity that is associated with a record. For example we have a product and if the customer orders more then one we want the sticker to print out twice. I am running crystal reports 8.
Thanks
DaveYou can set the number of copies to print , depending on the quantity|||How do you generate report?
If you generate it on customerwise, thru coding you need to check the number of records it prints and accordingly set print copies