When there is one or more serial numbers on an order line, how can these be placed on/in report 1306?
*This post is locked for comments
When there is one or more serial numbers on an order line, how can these be placed on/in report 1306?
*This post is locked for comments
Yes you can do this but the logic varies based on which report you want to print. If you are looking on sales invoice then you can add a new function to get serial no for each sales invoice line and insert into a temporary comment line table. the sample code looks like below, you need to call this function for every invoice line and then add a integer dataitem and loop through the tempsalescommentline to display the values
IF TempSalesInvoiceLine.Type <> TempSalesInvoiceLine.Type::Item THEN EXIT; TempItemLedgEntry.RESET; TempItemLedgEntry.DELETEALL; InvoiceRowID := TempSalesInvoiceLine.RowID1; ItemTrackingMgt.RetrieveILEFromPostedInv(TempItemLedgEntry,InvoiceRowID); IF TempItemLedgEntry.FINDFIRST THEN REPEAT SerialLot := TempItemLedgEntry."Serial No." + ' ' + TempItemLedgEntry."Lot No."; Inserted := FALSE; IF TempSalesCommentLine.GET(TempSalesCommentLine."Document Type"::"Posted Invoice",TempSalesInvoiceLine."Document No.", TempSalesInvoiceLine."Line No.", LineNo) THEN BEGIN IF MAXSTRLEN(TempSalesCommentLine.Comment) >= STRLEN(TempSalesCommentLine.Comment + SerialLot ) + 1 THEN BEGIN TempSalesCommentLine.Comment += ',' + SerialLot; TempSalesCommentLine.MODIFY; Inserted := TRUE; END; END; IF NOT Inserted THEN BEGIN LineNo += 10000; TempSalesCommentLine.INIT; TempSalesCommentLine."Document Type" := TempSalesCommentLine."Document Type"::"Posted Invoice"; TempSalesCommentLine."No." := TempSalesInvoiceLine."Document No."; TempSalesCommentLine."Document Line No." := TempSalesInvoiceLine."Line No."; TempSalesCommentLine."Line No." := LineNo; TempSalesCommentLine.Comment := TempSalesCommentLine.Comment + SerialLot; TempSalesCommentLine.INSERT; END; UNTIL TempItemLedgEntry.NEXT = 0;
Hi,
I havtn't done this in the mini-reports, yet, but you probable need to:
(1) add an extra 'Integer' dataitem for the (temporary) Item Tracking Lines, indented 1 level under the order line dataitem
(2) add code to the report, in OnAfterGetRecord of the order line, to populate the temporary table, and in the new dataitem to retrieve these records in the right order,
(3) add the s/n field as a column to the report dataset
(4) add the s/n field to the report layout.
You may want to do some concatenation of serial numbers to get more serial no.s on a line, otherwise the report might get really long in some cases.
Please add required field in report dataset desginer and also add it on requested page layout after that you can view required data in your report.
On an order, we have for example one item, where there are 2 serial numbers on the item under "item tracking lines". These serial numbers that are entered here, needs to be shown on for example the invoice.
Your Question is Not Clear.
Can you be more clear with an example please?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156