Groups | Blog | Home
all groups > sql server reporting services > march 2005 >

sql server reporting services : TOP N and total issue


Andy Jones
3/23/2005 6:03:03 PM
I have a table with 3 fields (defect1,defect2 & defect3) I would like to be
able sum the number of defect1's that are the same and then select the top n
of defect1 where n is a dynamic variable. In the report I would like to
display the top N but be able to drilldown and see the defect2, and defect3
sub categories for each defect1.

I really would appreciate any help or pushes in any direction. I am really
stumped on this one.
Jeff A. Stucker
3/24/2005 9:36:12 AM
That should be possible to build into your SQL statement, joining your
database table to itself, with a TOP N1 and GROUP BY on one side of the
join, and the detail results with a TOP N2 on the other side. Then you set
up your groups and show/hide inside the report tables. You can pass your
dynamic variable N2 as a report parameter, and make it a query parameter as
well.

--
Cheers,

'(' Jeff A. Stucker
\

[quoted text, click to view]

AddThis Social Bookmark Button