Order dataitem in report

tulliotullio Member Posts: 39
edited 2014-01-13 in NAV Three Tier
I've a strange problem.
In a report I need to show progressive customer due balance so, in "Cust. Ledger Entry" OnAfterGetRecord I write ProgrDueBal += RemainingNetAmount;
DataItem "Cust. Ledger Entry" was ordered for SORTING(Customer No.,Open,Positive,Due Date,Currency Code) ORDER(Ascending) WHERE(Open=CONST(Yes))

In the most customer detail all work great but sometime progressive due balance was wrong because printed list detail was different from order that was used in OnAfterGetRecord trigger.

So in my report I'have this list:

Doc Amount Prog. Bal. Due
1 10000 -7800
2 - 1200 -1200
3 - 500 -1700

But debugging code order was different because first was read doc 2, after doc 3 and last doc 1. So Progr. Bal. Due was printed wrong.

Why this??
How I can solve?

Comments

Sign In or Register to comment.