Hi,
Im making a reports,that will get the data from Sales (Purchase Invoice header and Lines) the. and I use the Array to Show the header of the reports…consist only the Item that in the Purch. Inv. Line…and Base on that item in Header…I will display all the quantity that Sales inv Line.
ex. (header) Item001 Item002 item03 Item04
Sales Invoice No.1 Qty. Item001 Qty. Item002 Qty. Item003 Qty. Item002
Sales Invoice No.2 Qty = 1 0 0 Qty. = 2
I use the Array to Show the Header, and the Body…but the Quantity of item base on Sales inv. Line is not display correct to the Item in the Header. Any Idea…?
This Is my Code:
Header Text 100
ColumnQuantity Decimal
i Decimal
tempItemNo Code 100
recItem Record Item
TempItemLine Record Item
DataBody Decimal
recSalesInvoiceLine Record Sales Invoice Line
MaxCount Integer
CompanyInfo Record Company Information
DATA ITEM
DataItem Name
Sales Invoice Header,Sales Invoice Line,Integer
Sales Invoice header - Onafterget Records()
IF “Sales Invoice Line”.FIND(’-’) THEN
REPEAT
IF NOT TempItemLine.GET(“Sales Invoice Line”.“No.”) THEN
BEGIN
TempItemLine.INIT;
TempItemLine.“No.” := “Sales Invoice Line”.“No.”;
TempItemLine.“Unit Price” := “Sales Invoice Line”.Quantity;
TempItemLine.Description := “Sales Invoice Line”.Description;
TempItemLine.INSERT;
// MESSAGE(’%1’,TempItemLine.“No.”);
END;
UNTIL “Sales Invoice Line”.NEXT =0;
i := 1;
IF TempItemLine.FIND(’-’) THEN
REPEAT
Header[i] := FORMAT(TempItemLine.Description);
//Header[i] := TempItemLine.“No.”;
i := i + 1;
UNTIL TempItemLine.NEXT =0;
Sales Invoice Line - onafterGetrecords()
//CLEAR(DataBody);
MaxCount := TempItemLine.COUNT;
FOR i := 1 TO MaxCount DO BEGIN
IF “Sales Invoice Line”.Description = Header[i] THEN
DataBody[i] := “Sales Invoice Line”.Quantity;
END;
i := 1;
IF “Sales Invoice Line”.Description = Header[i] THEN BEGIN
REPEAT
DataBody[i] := “Sales Invoice Line”.Quantity;
i := i + 1;
UNTIL “Sales Invoice Line”.NEXT = 0;
END ELSE
DataBody[i] := 0;
Integer -Onpredataitem()
Integer.SETRANGE(Integer.Number,“Sales Invoice Line”.COUNT);
That is My code…I hope any can healp me…about this…thanks a lot.[:)]