Unable to generate report using Embedded Web View

2 views (last 30 days)
Hello,
I have been trying to use the Simulink Report Generator toolbox and recreate the example as mentioned on
I created 2 files, SystemDesignVariables.m and testdata.m which is defined as class definition and report generation function.
However, when I try to execute testdata.m , followin error pops up
"Error using SystemDesignVariables
The specified superclass 'slreportgen.webview.EmbeddedWebViewDocument' contains a parse error,
cannot be found on MATLAB's search path, or is shadowed by another file with the same name.
Error in testdata (line 4)
rpt = SystemDesignVariables(rptName, model);"
Am I missing something in here? Can someone help to address this ?

Answers (2)

Sreelakshmi S.B
Sreelakshmi S.B on 7 May 2019
Generally the error 'cannot be found on MATLAB's search path, or is shadowed by another file with the same name.' is received when there is a user defined function in the MATLAB search path which has the same name as the MATLAB built-in function. In order to resolve the issue follow the troubleshooting steps below:
a) Manually go through the MATLAB search path and remove the paths which have functions conflicting with inbuilt MATLAB functions. Execute the following command to get the list of the current search path.
>> path
The following command may help to find the source of the issue:
>> which -all <conflicting_function>
b) If you are unsure of which paths to remove or the above command displays only one line, restore the MATLAB search path to its factory-installed state by executing the following command :
>> restoredefaultpath
Notice that the above command may remove the paths that you have previously added to MATLAB search path in order for your scripts to work. So it is advisable to save a backup copy of the current MATLAB search path before running the command.
You can refer to the following link to the documentation to backup the current search path:

Stefanie Schwarz
Stefanie Schwarz on 2 Sep 2020
Edited: Stefanie Schwarz on 3 Sep 2020
In addition to this, be aware that the slreportgen.webview.EmbeddedWebViewDocument class has only been introduced in R2017a. It is not available in older releases. See the note at the bottom of the following doc page:

Categories

Find more on File Operations 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!