Hi,
Is it possible (using a Dataport Export to .csv) to output one product per customer per line? At the moment if I loop through the Sales Invoice Line I can't find a way of grouping the Customers e.g if one customer buys a product at the start of the month and then the same product at the end of the month I want to total that as 2 of Product A for that Customer.
Any ideas?
Thanks
0
Comments
The Dataitem of your dataport, you must put on "Integer" and you loop this table so many times you have records in your temptable.
trigger "Integer - OnPreDataItem()":
trigger "Integer - OnBeforeExportRecord()"
In the dataport fields, you must use fields tmpTempTable."Field 1",tmpTempTable."Field 2",...
[/code]
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
FillTempTable(); and tmpTempTable? where/how are they defined?
Is FillTempTable() a custom function?
-"tmpTemptable" : global variable of type record of the same type as your real record but with property Temporary=TRUE. This means it will only be in memory, no other session, not even the other objects in your session will see it's records.
the code will be something like this: And that's it, after running this function, your temptable is ready to be exported.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Table 1 Record 1
Table 1 Record 2
Table 1 Record 3
Table 1 Record 4
Table 2 Record 1
Table 2 Record 2
Table 2 Record 3
Table 2 Record 4
...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.