Code Proj. Rsv. RMKS Retail Rsv. RMKS (PROJECT) (RETAIL) ItemA 20 AA001, 10 AA002 5 BB001, 20 BB002 ItemB 5 AA001, 20 AA002....********************************************************
ItemA 10 AA001, 10 AA001,4 AA002, 6 AA002 2 BB001, 3 BB001, 20 BB002 ItemB 5 AA001, 10 AA002, 10 AA002...I use this code:
Item - OnAfterGetRecord() sline.SETFILTER("No.",Item."No."); sline.SETFILTER(sline."Shortcut Dimension 1 Code",'PROJECT'); IF sline.FINDSET THEN BEGIN REPEAT IF (sline."Qty. to Ship" <> 0) THEN BEGIN ProRem[1]:=ProRem[1]+FORMAT(sline."Qty. to Ship")+'|'+sline."Sell-to Customer No."+', '; END ELSE BEGIN ProRem[1] := ProRem[1]+''; END; UNTIL sline.NEXT = 0; END; sline.RESET; . .. ...
Comments
IF you know let's say the number of projects will not exceed 10 or so then you could print them horizontally across several pages
But in general printing varying number of sums horizontaly is not easily implemented and i'd suggest to export data to Excel instead
And regarding of to print them in horizontal i can use STRLEN function to return the length of a string, then manipulate na maximum length of the record that will fit in the screen. and use the SHOWOUTPUT function to print the other record.
MAJOR CONCERN:.....
If there's a way to total the SLine."qty to ship" per customer in the section of ITEM BODY. please let me know.#-o
MAJOR CONCERN:.....
Please share some sample code's... to tatal the Sline qty, or "qty to ship" per customer in item body section in report. Thanks.
JPB
If i understand you right, you want printed something like this :
Item No NNNN: QtyForCust1, QtyForCust2, QtyForCust3 ...
Basically in Item dataitem on its AfterGetRecord trigger you have to define local record L_SalesLine variable set a filter on it and loop through it in REPEAT UNTIL L_SalesLine.NEXT= 0 summing your L_SalesLine."qty to ship" field. You will have to use an array of decimals to hold the qty for each customer.
then in Item's body section you can use multipe texboxes with SourceExpr set to array elements