Matlab Report Generator append function error ?

조회 수: 12 (최근 30일)
check Koutam
check Koutam 2015년 10월 30일
댓글: farzad 2020년 5월 21일
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"

답변 (2개)

Sean de Wolski
Sean de Wolski 2015년 10월 30일
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
Sean de Wolski
Sean de Wolski 2015년 11월 3일
No, it was released in R2014b. You will need to renew maintenance and upgrade in order to compile the DOM.
farzad
farzad 2020년 5월 21일

댓글을 달려면 로그인하십시오.


check Koutam
check Koutam 2016년 5월 26일
I found the answer for my question, I must put makeDOMCompilable; in my code, before import mlreportgen.dom.*;
  댓글 수: 2
Brandon Zepeda
Brandon Zepeda 2017년 1월 12일
Where does it put the executable? It isn't working for me. Script runs, however, the exe is not created.
Sean de Wolski
Sean de Wolski 2017년 1월 12일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by