Sorting by Employee No on report

VICTORIA_007
Member Posts: 7
Hello,
I have a problem with sorting on report in classic nav 2009 sp1. The Report is with DataItem: Dimension Value and indent table Employee. So it is group by Dimension and the Employees for every dimension are sorted like this: 1;10;100;2;21;3;300;4..... I want them to be sorted like this ascending : "No." : 1;2;3;4;10;21;100;300....
Please can anyone help me with this?
I have a problem with sorting on report in classic nav 2009 sp1. The Report is with DataItem: Dimension Value and indent table Employee. So it is group by Dimension and the Employees for every dimension are sorted like this: 1;10;100;2;21;3;300;4..... I want them to be sorted like this ascending : "No." : 1;2;3;4;10;21;100;300....
Please can anyone help me with this?
0
Answers
-
Have you tried using
SORTING(No.) ORDER(Ascending)
in DataItemTableView of Employee ??Thanks and Regards
Rishi0 -
==1;10;100;2;21;3;300;4===
It is very common confusion, you are expecting code datatype to be sorted as integer. In fact it is how the SQL sort the numbers stored as text or code. If you try to sort integers - the thing will work like 1,2,3...9,10,11...19,20,21. But when you sorting code field - the 1, 10, 100 always closer to A rather 2, 20, 200, which is perfectly fine. If you want to sort your dimensions A to Z then you have to define them as 001,002, 020, etc, maintaining the same number of characters for all records...0 -
Thank You,
I tried with SORTING(No.) ORDER(Ascending) on Data Item = Employee but No. in Employee table is of DataType Code so the result is the same as sorting in navision: 1;10;100;2;21;3;300;4.... It is not working.
If I define a variable gInt and put the values of No. in it as integer as EVALUATE(gInt,Employee."No."); I do not know how to use this to sort? Please any idea?0 -
No way to sort on global integer variable. read what i said before.0
-
What you can do is set the "SQL Data Type" property of the field in the Employee table to "Variant". Then it will sort properly.0
-
THANK YOU MBerger, THANK YOU A LOT!!!
IT IS WORKING! IT IS WORKING!
You make me very happy with SQL Data Type: Variant.
Best Regards
Victoria0 -
With SQL Data Type = Variant take in consideration these two remarks:
- If you have dimension values like 1, 2, 15 will not be possible to insert records with not significant zeros (like 01, 02, 015)
- String will be placed before numbers.* Daniele Rebussi * | * Rebu NAV Diary *0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions