sorting fields in table (sql report designer)

Please see attached.
I'm working on SQL 2012
How can I sort fields in added tables.
It is hard to find required field.


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

henryk123Author Commented:
Mike EghtebasDatabase and Application DeveloperCommented:
Copy and paste your SQL here otherwise I have to type it myself looking at the attached image.
henryk123Author Commented:
SELECT        Erp.OrderHed.RequestDate, Erp.OrderHed.OrderDate, Erp.OrderHed.OrderNum, Erp.OrderDtl.OrderLine, Erp.OrderHed.CustNum, Erp.OrderHed.PONum, Erp.OrderDtl.PartNum, Erp.OrderDtl.LineDesc,
                         Erp.OrderDtl.OrderQty, Erp.OrderDtl.UnitPrice, Erp.OrderDtl.DocExtPriceDtl
FROM            Erp.OrderDtl INNER JOIN
                         Erp.OrderHed ON Erp.OrderDtl.Company = Erp.OrderHed.Company AND Erp.OrderDtl.OrderNum = Erp.OrderHed.OrderNum LEFT OUTER JOIN
                         Erp.PartCost ON Erp.OrderDtl.PartNum = Erp.PartCost.PartNum
WHERE        (Erp.OrderHed.OrderDate >= CONVERT(DATETIME, '2015-05-01 00:00:00', 102))
Mike EghtebasDatabase and Application DeveloperCommented:
There are to ways you can sort your query:

1. After WHERE clause, type:
WHERE        (Erp.OrderHed.OrderDate >= CONVERT(DATETIME, '2015-05-01 00:00:00', 102))
OREDR BY Erp.OrderHed.RequestDate, Erp.OrderDtl.OrderQty DESC

for example. If you know what to order by, then type it in. If you don't include DESC, it will take ASC by defaule.

2. As shown on the image below, select Ascending for the field you want to sort. If the field name not visible, scroll up or down to locate it.
Work with Sort Type and Sort Order columns as required.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vitor MontalvãoMSSQL Senior EngineerCommented:
henryk123, do you still need help on this question?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.