I don't know that I would use VI for this Doug. VI can pull the data out, no problem, but it naturally wants to pull record for record. I mean , 1 header record is going to export 1 record(not 3 different records). If I had to do something similar I'd probably produce the export file with a more sophisticated query tool. Maybe MS Access, I might even just right a script myself that read the data I needed from history and then create and export the header and 2 detail lines in the script. Just trying to give you some direction. You could even produce a crystal report that you export and send to CommerceHub.(Not the most automated solution.)