You can need to use a large text in a report, and this text is subject to change.


As an example you have a text for Christmas holidays, one for Halloween, etc... You don't want the users to have to modify the report, but rather en external text file. This can be achieved in a way that allows the report smoothly even if the external file is missing.


*/ If the file specified in file-path exists, then its content is displayed, otherwise the text box is left empty.

iif(file(file_path), StringReplace(filetostr(file_path)), '')

*/ If C:\my_text.txt exists, then its content is used, otherwise the text-box is left empty.

iif(file('C:\my_text.txt'), StringReplace(filetostr('C:\my_text.txt')), '')

Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.