Sort report based on variable XYZ

bluesoulcurry
Member Posts: 25
I have created a report using Integer temporary table. I get all the data that I need to show in the report by inserting data in temporary tmpItem table. Now, I have a variable XYZ which is calculated dynamically using two flowfields of tmpItem table.
My requirement is to sort the report data of tmpItem table based on the variable XYZ in descending order. i.e. the line with highest value of XYZ should come on top. I referred to other posts, that says I should create XYZ as a key in the temporary table \. I don't know how can I add XYZ to the key of temporary table.
Thanks in advance.
My requirement is to sort the report data of tmpItem table based on the variable XYZ in descending order. i.e. the line with highest value of XYZ should come on top. I referred to other posts, that says I should create XYZ as a key in the temporary table \. I don't know how can I add XYZ to the key of temporary table.
Thanks in advance.
0
Comments
-
bluesoulcurry wrote:I have created a report using Integer temporary table. I get all the data that I need to show in the report by inserting data in temporary tmpItem table. Now, I have a variable XYZ which is calculated dynamically using two flowfields of tmpItem table.
My requirement is to sort the report data of tmpItem table based on the variable XYZ in descending order. i.e. the line with highest value of XYZ should come on top. I referred to other posts, that says I should create XYZ as a key in the temporary table \. I don't know how can I add XYZ to the key of temporary table.
Thanks in advance.
Check Report ID 711 Inventory - Top 10 List
or Report ID 111 Customer - Top 10 List
Now or Never0 -
Hi Navuser1,
Thanks for your reply. But the reports that you have mentioned uses a whole new thing for me. Excel Buffer. There should be another way to do it without using Excel Buffer as I have seen in other posts.
Regards.0 -
a temporary table is a "copy" of the actual table, if you want to add a key, you should do so in the actual table.
However, if you can sort the way how records are inserted into your temporary table, then you don't have to add a key.
I would use a temporary journal table, and use the line number to sort my dataset.
then I would insert my records based on the autosplitkey.item | XYZ | Line No. A | 50 | 10000 B | 30 | 20000 C | 60 | 5000 D | 25 | 30000 E | 80 | 2500 F | 55 | 7500 G | 28 | 25000
Sorted on line number I would have E 80, C 60, F 55,A 50, B 30, G 28 , D 25
worst case is that the first record would be the last and all the following line numbers will be < 10000, it is a case you might want to take into account.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