all groups > sql server reporting services > november 2004 >
You're in the

sql server reporting services

group:

First returns incorrect row


First returns incorrect row Aaron S.
11/24/2004 2:26:24 PM
sql server reporting services:
It seems First is returning the first row returned by the Dataset, not
the first row according to the sorting of the dataregion or grouping (as
the First function's documentation implies). This ends up with some
mysterious results in my reports. I created a simple example using the
SQL Northwind that shows the problem and attached it. Is this a bug or
intended behavior? It makes some of my reports using sorted groups have
seemingly bogus results when viewed.

Thanks,

RE: First returns incorrect row Charles Kangai
11/25/2004 2:55:04 AM
Yes, you're right. Do your sort in the dataset query not in the dataregion
Sorting tab.
Use ORDER BY in the query, that is.

Charles Kangai, MCT, MCDBA

[quoted text, click to view]
Re: First returns incorrect row Aaron S.
11/29/2004 9:22:55 AM
Thank you for the reply. I have added an order by to the SProc in my
production report and it works, this is not ideal for me as I'd rather
not have the SProc's sort dependent on a report. So is this a bug we
should expect to be corrected?

Thanks again for responding.


[quoted text, click to view]
Re: First returns incorrect row Dave
1/13/2005 9:51:32 AM
I just want to confirm that SRS ignores the Sort order of the table and
uses the sort order of the SP query. Is version 2 out yet ???!!


[quoted text, click to view]
AddThis Social Bookmark Button