SSRS (2K5) - Re-ordering the Groups

  • Hi

    I am newbie to SSRS and I have a report with a primary group and it now needs to be included a secondary group.

    When I include the new secordary group it becomes primary and the previous group becomes secondary and I do not how how to re-order this. In Crystal reports its easy to do this by using 'Section Expert'.

    Please would you advise me.

    thanks in advance

  • Without data, it just sounds like you want to change the ordering the data shows up... look at this example:

    DECLARE @T AS TABLE (Col1 int, Col2 varchar(255), Col3 int)

    INSERT INTO @T

    SELECT 1,'AA',2 UNION ALL

    SELECT 2,'AA',2 UNION ALL

    SELECT 3,'BB',2 UNION ALL

    SELECT 4,'BB',2 UNION ALL

    SELECT 5,'CC',2

    SELECT Col2, SUM(Col1) AS TotalCol1, SUM(Col3) AS TotalCol3

    FROM @T

    GROUP BY Col2

    ORDER BY Col2 DESC

    Even though CC was inserted last; it show up first because of Order By DESC Clause.

    PS Have a read at the article in my Sig, it shows how to ask for help. You'll find you'll get much quicker response that way :D.

    Thanks.

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

  • You have set the sorting columns in the "Sorting" section of the "Grouping and Sorting Properties" properties of the group.

    Optionally, you can use Expressions to conditionally sort the records based on some criteria.

    --Ramesh


Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply