Why am I unable to import an RTF file to the MATLAB Report Generator 2.0 (R14)?

2 views (last 30 days)
When I import an RTF file to the Report Generator, the generated report does not actually include the file and remains blank. When I view the Field Codes in the Microsoft Word document by checking the Field Codes option in the Tools->Option->View menu, I can see a link for including the file, but the file does not get included.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified this as a bug in the MATLAB and Simulink Report Generators Version 2.0 (R14) in the way that they handle the importing of Rich Text Format (RTF) files.
The Report Generator uses an insufficient number of backslashes to escape the backslash character used as the file path separator. To work around this issue, you can manually edit the report, adding the extra backslashes in the file path, or use the following code to obtain the new path and replace the path in the field codes in the report file with the output of this command:
strrep(which('filename.rtf'),'\','\\')
where filename.rtf refers to the file being included in the report.
Note that when the document opens, it may not refresh properly. Press Ctrl-A to select all and press F9 to update all the fields.

More Answers (0)

Categories

Find more on Reporting and Database Access in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!