SSRS doesn't like this, why?

User avatar
garbsmj
4StarLounger
Posts: 453
Joined: 04 Feb 2010, 03:40

SSRS doesn't like this, why?

Post by garbsmj »

Perhaps, I'm just doing something dumb here, but all I'm trying to do is count loans by county. In the subtotal section of the County group, I have:


="Total for " + Fields!County_Name.Value + ": "
+ CountDistinct(Fields!Loan_Num.Value, "County")


Where Loan_Num is the first field in the detail section and County_Name is the name of the county (eg. "Mickey") and County is the group.

The expression itself seems fine, but when I preview the report I get the ever so unhelpful "err#". I've verified that everything up to the CountDistinct is working - I've tried RunningValue too and it's bombed out. :bummer:

If you could just direct me to a handy-dandy site that discusses this and doesn't start with Micro####, it would be nice.
When one cat leaves, another mysteriously shows up.

User avatar
HansV
Administrator
Posts: 78446
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: SSRS doesn't like this, why?

Post by HansV »

What happens if you omit the "County" argument:

="Total for " & Fields!County_Name.Value & ": " & CountDistinct(Fields!Loan_Num.Value)

or for testing purposes just

=CountDistinct(Fields!Loan_Num.Value)
Best wishes,
Hans

User avatar
garbsmj
4StarLounger
Posts: 453
Joined: 04 Feb 2010, 03:40

Re: SSRS doesn't like this, why?

Post by garbsmj »

Thanks Hans! I knew it was something dumb I did. :thankyou: The count worked - now I just need to figure out how to get the rest of the sentence they want.

Bless this lounge :wave:
When one cat leaves, another mysteriously shows up.