RE: Flow field with SUM and MIN
Thanks this helped me to find a temporary solution as I created a flow field in Item table with Min date and applied it as below but I'm sure there is a better solution without creating field in item table:
begin
PurchLine.Reset;
PurchLine.SetRange("Document Type", PurchLine."Document Type"::Order);
PurchLine.SetRange("No.", ItemNo);
//PurchLine.SetFilter("Planned Receipt Date", '<%1', Today);
PurchLine.SetFilter("Planned Receipt Date", '=%1', Rec.EarliestPOArriveDate);
if PurchLine.FindSet() then
repeat
OutStdQty += PurchLine."Outstanding Quantity";
until PurchLine.Next() = 0;
exit(OutStdQty);
result

I don't think adding flowfields just for one report is a good idea except when you want to drill down