Is there a simple and nice way to convert a Text variable to an Instream?
I just want to enable the user to download a file, whose content I already store using a Text var.
My dirty way works as following, but the Record TempBlob is marked for removal:
var
fileName: Text;
fileContent: Text;
istream: InStream;
oStream: OutStream;
tempBlob: Record TempBlob temporary;
begin
// Here some code to fill fileContent and fileName
tempBlob.WriteAsText(fileContent, TextEncoding::UTF8);
tempBlob.Blob.CreateInStream(istream, TextEncoding::UTF8);
DownloadFromStream(istream, 'Export', '', 'All Files (*.*)|*.*', file_name);
end;