In Classic Client we are used to use the variable type File to write to a text file. In these cases we have had to convert the Icelandic characters from CP850 to ISO-8859-1 for this to be saved correctly. In Role Tailored Client this file is created on the server and you will have to download the file to the client computer and save it there.
There is an easy solution to this. Simply use the automation ‘Windows Script Host Object Model’.TextStream. First you need to create a file system object ‘Windows Script Host Object Model’.FileSystemObject.
SystemTextStream := SystemShell.CreateTextFile(TheFileName,TRUE);[/code]
where SystemShell is Automation ‘Windows Script Host Object Model’.FileSystemObject and SystemTextStream is Automation ‘Windows Script Host Object Model’.TextStream
For each line you need to write to the file you do
and the in the end you close the stream and thereby the file.
if the CREATE function use TRUE,TRUE then the automation is created on the client side and the file will be created on the client computer.
There are dotnet objects available to do the same thing if you are only running Role Tailored Client.