• Luke L (9/21/2010)


    so the sample data and expected output?

    If you're doing everything at rendering just pull everything, then group by columnA, add your calculations on columns b,c or whatnot. It's about the best I can do without something more concrete from you.

    I'm not sure at rendering is the best place to do all of your aggregation but YMMV depending on how much data you're talking about. No need to pull 1000 rows across the network just to aggregate them down to 5 when you can do that at the database and pull your 5 records. While SSRS does a pretty good job of this, the larger the dataset, the longer it takes to get to the SSRS server across the network, and thus the longer the user waits on rendering.

    -Luke.

    In fact, by selecting only those records which have a unique column A, I'm there, and at rendering I only do some calcs.

    Record ColumnA ColumnB ColumnC

    1 ABC1234 09/01/10 09/02/10

    2 ABC1234 09/01/10 09/03/10

    3 DEF1234 09/02/10 09/04/10

    4 GHI1234 09/05/10 09/05/10

    5 GHI1234 09/05/10 09/06/10

    What I want is to return Record 1 or 2 (it doesn't matter which, I assume whichever is first in the database), Record 3, and Record 4 or 5.

    The normal distinct will return all of these.

    Thank you.