write first line THEN write next until end

i need this to write to the next line instead of overwriting the previous line until all that is left is the last line of this table in a text file: CatalogFile.TEXTMODE := TRUE; CatalogFile.WRITE( ‘"’ + Catalog.Code +’"’ + ‘,’ + ‘"’ + Catalog.Name +’"’ + ‘,’ + ‘"’ + Catalog.“Season Code” + ‘"’); currently the text in the file looks like this: “MAGS03”,“Magazine Portolio”,“SP03” it needs to look like this: “MAGS03”,“Magazine Portolio”,“SP03” “HS03”,“Hershey’s”,“SP03” “LCS03”,“Liberty Candles”,“SP03”

Hi, Your sample code suggests that you’ve already opened or created the file by this point - I think that TEXTMODE must be set before you use the OPEN or CREATE command.

ok, i moved it to here and is still doing the same thing. CatalogFile.TEXTMODE := TRUE; CatalogFile.OPEN(CatalogFileName); in vb.net i can do a Write on the first line then do a Write line for the following lines.

Hi, What about using CatalogFile.SEEK(CatalogFile.LEN) after CatalogFile.OPEN

Hi Trint On which Triggers do you have your code. You would need the CatalogFile.WRITE command in some sort of repeating loop, or OnAfterGetRecord.TRIGGER possibly. Whilst the Catalog.OPEN and CatalogFile.TEXTMODE would need to be set before the loop or on the OnPreReport or OnPreDataItem triggers possibly.