Special kind of sorting in Crosstab Report - query

adi2011

Registered User.
Local time
Today, 15:16
Joined
May 1, 2011
Messages
60
Hello,

I recently made crosstab report which will help me a lot at my work-place and make it easyer for me to "monhly sales by country" which looks something similar to this:

report1996Jan.JPG


but report is not fully complete. Why? Because I must have these countries ordered in specific (not A to Z or Z to A) order and I am not sure how to achieve this. Report I showed in text above should have this exact country order:

Germany
France
USA
Mexico
Brazil
etc.

It would be very good if I could achive this because it will be of great help to me.

Any help is appreciated and many thanks in advancefor prompt replys!

Cheers;)
Adi
 
Last edited:
If image is not displayed correctly or not visible, please let me know.
 
p.s. if image is not displayed correctly or not visible, please let me know.
 
For any special sort order you need to capture that order along with the data that you will be displaying. That means either in the table you are pulling the country names from, or in an entirely new table you need a field called something like 'sortorder' which is a number and designates the order in which that country is to appear.

Using your criteria this is what that would look like:

countryname, sortorder
Germany, 1
France, 2
USA, 3
Mexico, 4
Brazil, 5
etc.

Then in your query, cross-tab or otherwise, you bring in the sortorder and sort by it in ascending order.
 
p.s. this topic was of great help to me, I hope it will help someone else with similar problem to.

Cheers,
Adi
 
p.s. this topic was of great help to me in solving this problem

All the best,
Adi
 

Users who are viewing this thread

Back
Top Bottom