Hello Divyesh,
The basis for my report is just a copy of the 10074 Sales Invoice (I used go-to definition to copy it) because i needed to add to the data set.
column(SubtotalAmountFromInvoiceLine; TempSalesInvoiceLine.SubtotalAmountFromInvLine)
{
}
This is the code I added the column to the report for
This is the code I am using to get the number
SalesInvLine.SetCurrentKey("Document No.");
SalesInvLine.SetRange("Document No.", rec."No.");
If SalesInvLine.Findset()
then
repeat
If (SalesInvLine.Description <> '~')
then begin
//SalesInvLine.SubtotalAmountFromInvLine := SalesInvLine.SubtotalAmountFromInvLine + SalesInvLine."Line Amount";
myInt := myInt + Rec."Line Amount"; //Creates the summation
Rec.SubtotalAmountFromInvLine := myInt; //Overwrites the old value with the new value per line.
end
else begin
myInt := 0; //resets the int value on the tilde. This will hopefully let us have the value not reset until the line AFTER the tilde.
//This way the tilde value will be the summation up until that point and the following will start at 0
end
until SalesInvLine.Next() = 0;