Effacer les filtres
Effacer les filtres

Report generator in compiled application

3 vues (au cours des 30 derniers jours)
SergioVez
SergioVez le 21 Avr 2022
I had a MATLAB program where I could create a report through opening an existing word template (with "holes") and filling them appending data and moving to the following hole. Then that file would be saved in an specific path. All that worked. Now, I made a compiled application and when I try to generate the report it doesn't work. I don't know the reason as I don't get any error feedback. I tried adding makeDOMCompilable() at the beggining but didn't work. ¿Any idea on how to solve it or, at least, check where the compiled application stopped?
Thanks a lot in advance!

Réponses (1)

Ashutosh Thakur
Ashutosh Thakur le 25 Jan 2024
Hi Sergio,
The issue with compiled application involving report generation can be due to various reasons. I am listing down some reasons which would help you in troubleshooting the issue:
  • Try to compile the application using the Application Compiler app instead of using "compiler.build.standaloneApplication" function.
  • Also check the version of MATLAB in which App is compiled and version of theMATLAB Runtime environment are same or not. Differences in version can cause some issues in the execution of the application.
  • Also check if you have permissions to write or access the word file or not.
  • Also refer to the following link regarding common errors faced while compiling standalone application: https://www.mathworks.com/help/compiler/does-the-failure-occur-when-deploying-the-application-to-end-users.html
  • Since you are not receiving any error message, I suggest modifying the code using "Try-Catch" statements and log the errors in a text file, and later debug the error displayed in the text file. Please refer to the following code example to implement a logging feature in the codebase:
try
% Your code to generate the report
catch ME
fileId = fopen('errorLog.txt', 'a');
if fileId ~= -1
fprintf(fileId, '%s: %s\n', datestr(now, 0), ME.message);
fclose(fileId);
end
end
I hope this helps you in resolving the issues associated with the standalone application.

Catégories

En savoir plus sur Adding custom doc dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by