Report Related query

Hi All,

I have to make a report in which i have to show data like this for example

Slaes order Shipment header Sales invoice Purcase oder Purchase Receipt Purchase invoice

SO/1213/01 Ship/1213/001 SI/1213/001 PO/1213/001 PRecp/1213/001 PI/1213/001

Ship/1213/002 SI/1213/002 PRec/1213/002 PI/1213/002

PO/1213/002 PRec/1213/003 PI/1213/003

PO/1213/003 Prec/1213/004 PI/1213/004

Prec/1213/005

Here iam using the special order , so i can easly recongise the PO, but my problem is that for getting this PO iam using this code

grecSalesLine.SETRANGE(grecSalesLine.“Document Type” , grecSalesLine.“Document Type”::Order);
grecSalesLine.SETRANGE(grecSalesLine.“Document No.”,“Sales Header”.“No.”);
IF grecSalesLine.FINDFIRST THEN REPEAT

ponumber := grecSalesLine.“Special Order Purchase No.”;
grecExcelBuffer.AddColumn(ponumber,FALSE,’’,FALSE,FALSE,FALSE,’’);
END;

UNTIL grecSalesLine. NEXT = 0;

any one has idea what should i use in place or repeat and until so that i get one by one PO order number so that i can get the other information regarding the GRN number or PI.

Regards,

Shailesh