New field in report

I want to show in my report the Service Order Description.

These are my data Items

DataItem Name
Service Contract Header
Service Ledger Entry

In Service Ledger Entry dataItem I have this C/AL

IF “Service Ledger Entry”.“Service Order No.” <> ‘’ THEN

ServHeader.SETCURRENTKEY(“Contract No.”,Status,“Posting Date”,“No.”);
ServHeader.SETRANGE(“Contract No.”,“Service Ledger Entry”.“Service Contract No.”);
// ServHeader.SETRANGE(“No.”,“Service Ledger Entry”.“Service Order No.”);
IF ServHeader.FIND(’-’) THEN
Desc := ServHeader.Description;

But wit this I have only the last server Order description.

I created a new key in 5900 table like this:

Contract No.,Status,Posting Date,No., but did not solved my problem.

How can I do It? I need each description server order (table 5900) in my Service Ledger Entry body session.


Is it Last Service Order Description or FIRST Service Order Description? You should consider adding another data item ServHeader…

I created a new DatItem l for service header

DataItem Name
Service Contract Header
Service Ledger Entry
Service Header

With DataItem Link = Document Type=FIELD(Document Type),Customer No.=FIELD(Customer No.),No.=FIELD(Service Order No.)

In source expression of Service Ledger Entry Session I put “Service Header”.Description.

But in report the fild is empty :frowning: