I am new here, recommended by a friend.
My work place are preparing to launch Dynamics NAV 365 Client side manufacturing next week and they have asked me to write a few reports, I am a full C# Developer.
I am stuck on a particular report and I am not sure what I am doing wrong!
Basically I was asked to create a Delivery Note report,
These are the tables
Job Ledger Entry, Job Planning Line, Job Task, Job, and Job Site Address
Job Ledger Entry
Job No. = "2010"
Document No. = "DN000029"
Job Site Address
Code = "Main"
What I need is the report to sum any previous Delivery Notes based on the filter the user enters.
Imagine that the Quantity is 10 and last week we raised a delivery note saying that we were sending 2 items this should leave us 8 Remaining Qty, means that there will be 8 more items left to be shipped.
Now let`s say that I send another 2 more today I want the report to sum any previous sent items, so I can report back to the user how many is left,
My thoughts from the beginning was I will just report the Remaining Qty from Job Planning Lane but that`s not the case, here is why if they already shipped a few of these items I would like the code only to report anything before the current Filter Document No.
here is my code when I use it, it breaks my dataset, so I am not getting all the rows I was suppose to have
GlobalQTYToFollow is just a integer global I did
Job Ledger Entry - OnAfterGetRecord()
"Job Ledger Entry".RESET;
"Job Ledger Entry".SETCURRENTKEY("Job No.");
"Job Ledger Entry".SETRANGE("Job No.","Job No.");
"Job Ledger Entry".SETFILTER("Document No.",'<=%1',"Document No.");
IF "Job Ledger Entry".FINDSET(TRUE,FALSE) THEN REPEAT
GlobalQTYToFollow := GlobalQTYToFollow + "Job Ledger Entry".Quantity;
UNTIL "Job Ledger Entry".NEXT =0;
if any of you could please tell me what I am doing wrong