Matlab Report Generator append function error ?
5 views (last 30 days)
Show older comments
I have a code which generates a Word report (using Matlab report generator toolbox). This code works perfectly when I launch it on Matlab. However, when I compile it (using Matlab compiler toolbox) in EXE file, and I launch this EXE file, there is an error at line 5 (append function). For the license, I have a valid license. I think that the problem concerns the compilation. Anyone has the same problem or knows how to fix it ?
My code:
function test
import mlreportgen.dom.*;
d=Document('c:\abc.docx','docx');
t=Paragraph('test');
append(d,t);
close(d);
end
Error message:
"Unable to check out a Report Generator license. Reason: ''. Error in => test.m at line 5"
0 Comments
Answers (2)
Sean de Wolski
on 30 Oct 2015
You need to include the following in the test file before compiling it:
% If compiling, make the DOM compilable
if ismcc || isdeployed
% Make sure DOM is compilable
makeDOMCompilable()
end
5 Comments
Sean de Wolski
on 3 Nov 2015
No, it was released in R2014b. You will need to renew maintenance and upgrade in order to compile the DOM.
farzad
on 21 May 2020
Dear Sean
I used this method, It does not work. shall you please check my question?
check Koutam
on 26 May 2016
2 Comments
Brandon Zepeda
on 12 Jan 2017
Where does it put the executable? It isn't working for me. Script runs, however, the exe is not created.
Sean de Wolski
on 12 Jan 2017
Brandon, you should probably open a new question. Are yo using the compiler app to build it?
applicationCompiler
Under settings you can tell it where to put the exe.
See Also
Categories
Find more on MATLAB Report Generator 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!