"Kevin B" <No-SPAM@misnet.info> wrote in message
news:uPhiiL9gEHA.644@tk2msftngp13.phx.gbl...
> I see what you are trying to do - create a unique ID and then "count".
That
> works for my "Northwinds" database, but it doesn't work for my "real"
data.
> Which leads me back to square one.
>
> Regretfully, I am becoming more convinced that RS can't match up to
> Crystal - which I would *love* to replace with RS. The report
distribution
> options are by far excellent compared with Crystal (for our environment).
> BUT...we haven't been sucessful at writing complex reports with many
> statistics. Most all of our report have executive summarys at the end
them
> to give comparative views or analysis; RS can't genereate even a "simple"
> count of data.
>
> Robert, I appreciate your help - and I haven't completely given up. I
have
> called our TAM with MS and he is researching this for me as well. I am
very
> anxious to see what will develop with RS, but for now, it is a kid's
> reporting tool. I have spent too much time trying to get blood out of
this
> rock...it just cant do it.
>
> We have some reports that are simple - and RS does a great job. Everyone
> wants to know when the other reports will be like those. I am starting to
> doubt if it will be anytime soon.
>
> Our TAM has offered a conference call with a RS Product Manager to discuss
> our problems. For us, this is a major show stopper, no matter how good
> report distribution is - the report has to be "right".
>
> Thanks for your help - if you think of anything else that would help -
> please let me know.
>
> -KB
>
>
>
>
> "Robert Bruckner [MSFT]" <robruc@online.microsoft.com> wrote in message
> news:%23KYF6o8gEHA.3988@tk2msftngp13.phx.gbl...
> > Assuming the MonthShipped value is actually a full DateTime object, you
> > should try this to get 14 distinct months:
> > =CountDistinct(Year(Fields!MonthShipped.Value) * 100 +
> > Month(Fields!MonthShipped.Value))
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> > "Kevin B" <No-SPAM@misnet.info> wrote in message
> > news:O22qvP8gEHA.596@TK2MSFTNGP11.phx.gbl...
> > > That works, except when I "roll them up" in the table footer, it
counts
> 12
> > > distinct months...novel, huh??
> > >
> > > I have tried using the aggregate functions, but it seems they only
> > recognize
> > > a scope looking "out", not "in". For example, I can reference an
> > aggregate
> > > SUM value on table_Group1 in the table1_Group2 footer - but not vice
> > versa.
> > > More to the point, I can't reference an Aggregate sum of table1_Group1
> > from
> > > the table footer.
> > >
> > > Regarding the CountDistinct function - I can count the distinct values
> in
> > > Group 2, but how do I count each row in the Group 2 Header report?
> > >
> > > Example:
> > >
> > > Group 1 Header 2003
> > > Group 2 Header 07
> > > Group 2 Header 08
> > > Group 2 Header 09
> > > Group 2 Header 10
> > > Group 2 Header 11
> > > Group 2 Header 12
> > > Group 1 Footer Total: 6 months
> > > Group 1 Header 2004
> > > Group 2 Header 01
> > > Group 2 Header 02
> > > Group 2 Header 03
> > > Group 2 Header 04
> > > Group 2 Header 05
> > > Group 2 Header 06
> > > Group 2 Header 07
> > > Group 2 Header 08
> > > Group 1 Footer Total: 8 months
> > > Table Footer: Total: 14 months
> > >
> > > This is rather simplistic, but if it is "do-able", then it will solve
> > other
> > > problem in our attempt to calculate statistics at the end of a report.
> > >
> > > GOAL: Be able to calculate the "14" in the table footer...if I try
> Count,
> > it
> > > will count all of the rows in the dataset (way too many)...if I use
> > > CountDistinct, it returns "12" - not enough!
> > >
> > > Thanks - I know you are trying!
> > >
> > > -KB
> > >
> > >
> > > "Brian Welcker [MSFT]" <bwelcker@online.microsoft.com> wrote in
message
> > > news:u2KfYj7gEHA.1184@TK2MSFTNGP12.phx.gbl...
> > > > You need to use the CountDistinct aggregate. The key is what do you
> want
> > > to
> > > > count the distinct values of? If you want months within the year,
you
> > need
> > > > to specify:
> > > >
> > > > =countdistinct(Fields!MonthShipped.Value)
> > > >
> > > > as the value of your textbox.
> > > >
> > > > --
> > > > Brian Welcker
> > > > Group Program Manager
> > > > Microsoft SQL Server Reporting Services
> > > >
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.
> > > >
> > > > "Kevin B" <No-SPAM@misnet.info> wrote in message
> > > > news:%23TG0bb5gEHA.3864@TK2MSFTNGP10.phx.gbl...
> > > > >I follow your explantion, but you didn't follow my problem. I
don't
> > want
> > > > >to
> > > > > to total all the records returned by the SQL statement!
> Specifically,
> > I
> > > > > want to count the number of unique values within a group.
> Hopefully,
> > to
> > > > > simply, I have attached a RDL against Northwinds (just change the
> > server
> > > > > name in the dataset).
> > > > >
> > > > > Draw your attention to "textbox8". I have used this formula:
> > > > > =count(Fields!ShippedDate.Value,"table1_Group2") and it says it
is
> > out
> > > of
> > > > > scope...well the scope I want to count is table1_Group2! If I use
> > this
> > > > > formula: =count(Fields!ShippedDate.Value,"table1_Group2") it
> returns
> > > 143
> > > > > as the value. The value I am expecting is 6 - the number of
months
> in
> > > the
> > > > > report.
> > > > >
> > > > > Thanks for you help - I have tried everything I can think of.
Maybe
> > > this
> > > > > can help you to help me.
> > > > > -KB
> > > > >
> > > > >
> > > > > Here is the rdl referenced above
> > > > >
> > > > > <?xml version="1.0" encoding="utf-8"?>
> > > > >
> > > > > <Report
> > > > >
> > >
> >
>
xmlns="
http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini > > > > > tion"
> > > > >
> > >
> >
>
xmlns:rd="
http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> > > > > >
> > > > > <RightMargin>1in</RightMargin>
> > > > >
> > > > > <Body>
> > > > >
> > > > > <ReportItems>
> > > > >
> > > > > <Textbox Name="textbox1">
> > > > >
> > > > > <Style>
> > > > >
> > > > > <PaddingLeft>2pt</PaddingLeft>
> > > > >
> > > > > <FontFamily>Times New Roman</FontFamily>
> > > > >