If you need one CSV file including
|Line identifier||Order number||Details|
|HEADER||#01||Header details ....|
|LINE||#01||Line details ...|
Here is a detailed step by step guide how to configure a csv export like this using DataChamp:
Click on "New Report", than choose "Orders".
Choose from Order and other sections - like "Order / Shipping Address":
You will find this option in the tab "Rows":
Choose again Export "Order" and name the tab "Order lines":
Remove everything you don't need repeated for every line because you already outputed the information with the header line. And add everything you need from the "Line items".
As you configured the first tab "Order headers" you now activate "Omit header row" for this second tab "Order lines":
This option is necessary to get a filled custom column "Line identifier" for each "Order line". Click on "Edit" in the settings area on the right:
In the right column you find the settings for file type. Chosse "CSV".
Choose from the button at the top right "Save & Run". Take a look at your csv file and do further customizations if necessary. If you run into line limit warnings configure filters for both tabs. E.g. only export recent orders by using the filter "created at".