moveToNextHole in Report Generator does not compile.

I am using Matlab 2015b 32bit with Report Generator and compiler. moveToNextHole does not compile in the following example from the user guide:
======
function makerpt(title,author,content,rptname,rpttemplate) import mlreportgen.dom.* rpt = Document(rptname,'docx',rpttemplate);
while ~strcmp(rpt.CurrentHoleId,'#end#')
switch rpt.CurrentHoleId
case 'Title'
append(rpt,title);
case 'Author'
append(rpt,author);
case 'Content'
append(rpt,content);
end
moveToNextHole(rpt);
end
close(rpt);

 채택된 답변

Paul Kinnucan
Paul Kinnucan 2016년 5월 12일

1 개 추천

To be compilable, a MATLAB application that uses the DOM API must invoke makeDOMCompilable() before invoking any DOM function. See makeDOMCompilable.

댓글 수: 2

It works. Thanks a lot.
dear Paul if I have a function in which I import rpt generator, should I use this command before calling that function or right before that line of importing ?

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

추가 답변 (0개)

질문:

2016년 5월 4일

댓글:

2020년 5월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by