I want to export Sales Order data with 2 levels as of the Sales Header and Sales Lines. Is there a way to do that? The xml port is defined as format = Fixed Data (no XML format).
I was trying to define the fields as:
Root Element Text <Root>
SalesHeader Element Table <SalesHeader>(Sales Header)
HeaderField1 Element Text <HeaderField1>
HeaderField2 Element Text <HeaderField2>
HeaderField3 Element Text <HeaderField3>
..etc..
SalesLine Element Table <SalesLine>(Sales Line)
LineField1 Element Text <LineField1>
LineField2 Element Text <LineField2>
LineField3 Element Text <LineField3>
But this format doesn't seem to work since I'm getting this error:
'An element with source type Table cannot have Table element children.'
0
Comments
your assumption is correct. NAV does not allow parent/child indentation of table elements for Fixed Text or CSV format. You would have to use the Xml format instead or use a plain data structure with independent table elements for SalesHeader and SalesLine.
Hope this helps
Andrew T.
https://youtu.be/qNYrmZXUOxE
That was in 2009 though I think, not sure if it wouldn't work anymore. See if you can make this work.
RIS Plus, LLC
RIS Plus, LLC
I actually figured out a way doing that. I created an integer and running through all the data (parent and child), buffer it and then using an Integer that has one datasource field. I added some code in the DataItem to control the export. I string the Parent data when Parent Data needs to be exported and string the Child data when Child Data needs to be exported. The record length is for both Parent and Child the same but the layout is defined in code. It works pretty well although a bit slower than a straight export would be.