Page 1 of 1

Merge two report files to get one file to display

Posted: July 2nd, 2020, 12:22 pm
by Boni
Dear All !!!
Hello everyone! I design a reporting application of two text files. I would like my application instantly merge the two files produced to display a single file automatically.
I'm facing on CSPro 7.4 the error message 14012 ("TEXT FILE IS NOT ENCODED IN A FORMAT SUPPORTED BY CSPRO".
Your help please !!!

Re: Merge two report files to get one file to display

Posted: July 2nd, 2020, 1:48 pm
by Gregory Martin
You can use the fileconcat function:
fileconcat("combined_report.txt", "part1.txt", "part2.txt");

Re: Merge two report files to get one file to display

Posted: July 2nd, 2020, 5:51 pm
by Boni
The problem is solved, I had forgotten to call the "Close function to close my report file <"Close(Report_file)"> otherwise there was no error on logic.
Thank you Dear Gregory!!