I want to generate a report to show a list of posted invoices with detail item information. So I add two DataItems – Sales Invoice Header and Sales Invoice Line. But how to show the Lot tracking entries? There is no direct link between Sales Invoice Line and Item Ledger Entry so that I cannot set Item Ledger Entry as DataItem. I have to use some code to search those entries. I can get those entry, but I cannot show them on the report. One invoice line may have few Item Ledger Entries.If I use text box at Invoice Line section, I only can show one entry. Using “Integer” can solve this problem? I am not familiar with Integer. Anybody has a solution? Thanks in advance.
hi, Your apporoach is correct. Loop the integer with the number of tracking entries your want to display. Look at some of the standard report which uses integer. Hari
Hi… It is true that there is no direct link between Sales Invoice Line and Item Ledger Entry…but there is a Link between Sales Invoice Line with Value Entry table and Value Entry table is linked with Item Ledger Entry table via…Item Ledger Entry No.Field… So you can add Value Entry as a report dataitem and create global variable of Item Ledger Entry table and linked with Value Entry as u wish… Ok…
You’re right, there is no “direct link” between sales invoice lines and item ledger entries, but instead of using an integer variable to show your lot nos, you could add a third dataitem of item ledger entries, and set the necessary filters in the OnPreDataItem trigger, on Document No. from the Header, Posting Date from the Header, Source Type as fixed Filter on Sale, Source No and Producto No. from the Lines, and so on. Hope this input halps to avoid the integer dataitem, though it is possible to use those aswell. Saludos Nils
There is a link. See the code in sales invoice line table function Show tracking line. Use the similar code to print Lot Nos. Just yesterday, I printed Serial Nos.(Item tracking entry) from Item Ledger entry on Sales Invoice(Posted) report.
The above mentioned solution’s code is in version 3.7 I didn’t look into previous versions