I can't use Document command to generate a Report

2 vues (au cours des 30 derniers jours)
Junior Joel Aguilar Hancco
Junior Joel Aguilar Hancco le 15 Fév 2021
  6 commentaires
Junior Joel Aguilar Hancco
Junior Joel Aguilar Hancco le 15 Fév 2021
Sorry, I don't know what happened but I can't see your last reply again. But you mentioned that it could be the syntax, however I was guided by a mathworks tutorial on generating reports.
maybe, is my Matlab version? 2020a
Cris LaPierre
Cris LaPierre le 15 Fév 2021
Sorry, i realized I was wrong so removed it. This link is helpful.

Connectez-vous pour commenter.

Réponse acceptée

Cris LaPierre
Cris LaPierre le 15 Fév 2021
With the documentation example working, try using your template again. Do you still get the same error?
If so, how did you create your template? What happens if you create your template using
  2 commentaires
Junior Joel Aguilar Hancco
Junior Joel Aguilar Hancco le 15 Fév 2021
Hi, it works fine now! thanks a lot. So, i suppose that i have to create the document with code as a first step, rigth?
Cris LaPierre
Cris LaPierre le 15 Fév 2021
Modifié(e) : Cris LaPierre le 15 Fév 2021
I just worked through the example in the video you shared, and it worked fine for me. Perhaps you just needed to restart MATLAB?

Connectez-vous pour commenter.

Plus de réponses (1)

Rahul Singhal
Rahul Singhal le 15 Fév 2021
The issue in the non-working script is that it has a typo in the package import statement, which is the reason it is not able to recognize the Document class.
Change:
import mireportgen.dom.*;
to
import mlreportgen.dom.*;
  2 commentaires
Cris LaPierre
Cris LaPierre le 15 Fév 2021
I think that confirm I need glasses :)
Junior Joel Aguilar Hancco
Junior Joel Aguilar Hancco le 15 Fév 2021
me too! =) Thanks @Rahul Singhal !

Connectez-vous pour commenter.

Catégories

En savoir plus sur Reporting and Database Access dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by