Salesheader.No not sorted when i put it in sales line body report

I make report as following

Data Item Name
Sales Header Sell-to Customer No.=FIELD(No.)
Sales Line Document No.=FIELD(No.)

with indecent and relation to each other as above

in sales line body report i display sales header.No then quantity

then the records show but problem i can not show Sales Header .No in sorting ascending i write inside data item table view

of sales header sorting (no) ascending but no result .i see order no 54,34,64 meaning not arranged

how i solve this problem or arranged it ascending


Hi ,

do you have the matching index on the table , too ?


i have key no for sales header table and i use it but no result

What is the use of Customer Dataitem in Report?

Check what is sorting order on Customer Dataitem.

Select an index from the dropdown on the DataItemTableView , check you have “No.” only in your indexes ?

By default there wouldn’t be such index. you could go with No.,Document Type .

Since your filter should be No. and Document Type anyways.


With customer table on the top of indexing order, you will never be able to get the order as you want. Looking at your report, the system will display the result based on the customer and not on the sales header no. lets say if system gets first customer A, then the system will show all the invoices of customer A irrespective of document no.

Why, the sorting would be applied per customer , then Sales order , thats what he’s up to.


Its is not mandatory that for a particular customer lets say ‘A’ the invoices made are in series. it may take no. as say 1,5,8,14 and so on. So when we apply the customer no. table on the top of the indent, the system will display all the records related to the Customer ‘A’ so you wont get the document no. 2,3,4 after 1. After one you will only be able to see 5,8,14.