Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
osupratt
Posting Yak Master
238 Posts |
Posted - 2008-03-12 : 10:51:09
|
I'm trying to find out how to limit my rows in a group to Top N (N being 20). Does anyone know how to do this and would this be done on the query side or the Report Designer side? Thanks. |
|
dineshasanka
Yak Posting Veteran
72 Posts |
Posted - 2008-03-12 : 15:35:25
|
You can do it both ways. But I feel doing with query is the best way with using ROW_NUMBER() function---------------------http://dineshasanka.spaces.live.com/ |
|
|
osupratt
Posting Yak Master
238 Posts |
Posted - 2008-03-13 : 11:53:26
|
Unfortunately this function doesn't work on the Report Side of Visual Studio (SSRS). It does have the function 'rownumber' which I've tried:rownumber()In the parenthesis is supposed to be the scope which in my case I'd like to be a Group. When I try to add the Group name (the title of the group?) it comes back with an error.Can anyone help me on this side of things? Thanks. |
|
|
dineshasanka
Yak Posting Veteran
72 Posts |
Posted - 2008-03-15 : 08:28:53
|
I mean, include ROW_NUMBER function in to dataset,so that you can get the row number from the data set---------------------http://dineshasanka.spaces.live.com/ |
|
|
osupratt
Posting Yak Master
238 Posts |
Posted - 2008-03-17 : 10:12:26
|
Thanks. Do you mean somehow put it in my SQL query or create a new dataset? Could you possibly walk me through this a little? Again thank you. |
|
|
dineshasanka
Yak Posting Veteran
72 Posts |
Posted - 2008-03-23 : 10:23:16
|
quote: Originally posted by osupratt Thanks. Do you mean somehow put it in my SQL query or create a new dataset? Could you possibly walk me through this a little? Again thank you.
Yes create dataset and write a t-sql inlcude ROW_NUMBER() function. Then include that to the report---------------------http://dineshasanka.spaces.live.com/ |
|
|
|
|
|