Wayne,
Thanks for all the help. I couldn't get the Order By to sort
correctly, but I think it was because of what I was trying to do and my data.
Good news is I did resolve my problem, thanks to your ideal I found
something that works. Probally not the best way, but it is working. I
created an extra field in the select statement to hold the sort number and
then use order by to sort on the new field. The part of the select statement
looks like this;
Select 'Group_Order' =
CASE Groupname
When 'D' THen 1
When 'A' then 2
When 'C' then 3
When 'B' Then 4
When 'E' Then 5
Else 6
end, Groupname, GroupID from test
Order By Group_Order
This worked great for what I'm doing, but if anyone has a different way or
ideal would be glad to hear it.
Again Wayne, Thanks for the help.
Henry
[quoted text, click to view] "Wayne Snyder" wrote:
> Thats an interesting question, and I haven't tested this, but why not try to
> sort the incoming data in the proper order you wish the groups to appear,
> then do no sorting in the groups...
>
> the order by in the SQL might be something like
>
> ORDER BY CASE Groupname
> When 'D' THen 1
> when 'A' then 2
> When 'C' then 3
> When 'B' Then 4
> When 'E' Then 5
> Else 6
> end
>
> Hope this helps...
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
>
www.mariner-usa.com > (Please respond only to the newsgroups.)
>
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
>
www.sqlpass.org >
> "itbik" <itbik@discussions.microsoft.com> wrote in message
> news:A1C79552-034C-40E7-8E7A-C9BAFF8787C5@microsoft.com...
> >I hope someone can answer my question. I'm wondering is there a way in RS
> >to
> > put group items in a specific order. For example, I have a field I group
> > on
> > and the items are A/B/C/D/E but I want to see the items in this order
> > D/A/C/B/E. I was able to do this in Crystal Reports and was hoping I
> > could
> > do it in RS.
> >
> > Thanks in advance for any help.
> > Henry
>
>