Report Sorting Problem

If 3 tables fields are needed in one report: 1.) Sales Invoice Header (Order No, Invoice No,…) 2.) Sales Invoice Lines (No…) 3.) Item (Description) I want to sort by 1.) Item description 2.) Order No 3.) Invoice No 4.) Invoice Lines No (Link “Sales Invoice Line”.No with Item.No) Is it possible to make this?

Hi, If it is a fixed grouped sort, meaning the following: - 1) Item description ---- 2) Order No --------- 3) Invoice No --------------- 4) Invoice Line No then you have to juggle around the Data Items in the report and select the appropriate keys. Your Data Item indentations (and their relations/keys) should reflect the sort order you want. If it is an independent sort order, meaning that the user needs the report to be sorted one time on Item description and the next time on for instance the Invoice No, independent of the Data Item indentation, it’s best to define a temporary table containing all the data you need to sort on, define the appropriate keys for the table, populate the temp table at runtime and print the temp table with an Integer loop. There are lots of topics on the forum describing how to do this exactly. Hope this makes any sense to you and helps you out a bit. Michiel

The item description is filtered from “Sales Invoice Line”.No, is it possible to sort it in this way? Do u mean that it is possible to do dynamic grouping with using temp table?

Hi, Yes, it is possible to sort on that. Basically, if you’ve got a key on a field (or set of fields) you can sort on it, otherwise you cannot. And yes, it is also possible to sort on the fly, both with keys and without. A good example of how to do this without predefined keys is the JIT sort at http://www.navisioner.com/html/jitsort.htm from José Femenías Cañuelo. Regards, Michiel

Does it applicable for the version 3.7 and above? I try to import it but cannot make it.

Does it work for the reports? Other than sort in the property(DataItemTableView) of the data item, is there any way we can sort our data? Can we sort it using code?

Hi, Sorry it took so long to reply, but haven’t been online for a couple of days. Anyway, as you can see on José’s website, it is freeware “as is” so you best try to fiddle around a bit. I saw that the objects in the downloaded JIT file are all numbered 50001 (Table, Form, Report, CodeUnit) Maybe there are already 50001’s present in your system. Otherwise, just open the file on its own with the Navision client and copy/paste the items. Personally, I wouldn’t know what the problem with >=3.70 could be - I’m on 2.60. And yes, you can use it for reports: before actually running the report, invoke a window with the JIT sort, let the user sort on his/her desired fields and print the report. Hope this helps. Michiel

As i am in the 3.7 i cannot import that to my navision…