Matlab Report Generator errors occasionally when closing the document, why?

조회 수: 25 (최근 30일)
ching ning Liu
ching ning Liu 2023년 12월 22일
답변: Manikanta Aditya 2024년 1월 8일
I am using the Matlab Report Generator to build and save a PDF report. Occasionally when it is building the reports I will get many errors when I clsoe the report.
Error using mlreportgen.internal.fop.createFOPObject
Failed to create file modification time character vector.
Error in mlreportgen.internal.fop.createFOPObject
Error in mlreportgen.internal.fop.createFOPObject
Error in mlreportgen.internal.fop.foToPDF
Error in mlreportgen.report.ReportBase/close
Error in
close(MeasReport);
  댓글 수: 2
Yash
Yash 2023년 12월 26일
Hi Ching Ning Liu
I understand that you are facing issues while building and saving a PDF report. Kindly ensure that the files that you are using are added to the path.
However the error appears to be very specific to your code. Kindly share the files using the attachments option for a better resolution.
ching ning Liu
ching ning Liu 2023년 12월 28일
Hello I'm trying to using below code to create the pdf file.
import mlreportgen.report.*;
import mlreportgen.dom.*;
Time = datestr(now, 'dd-mmm-yyyy_HH_MM_SS');
%--------------------------------------Report Formatting------------------------------------------%
% Define the type of document
DocType = "pdf";
% Define the measurement report with a unique name + timestamp and document type
MeasReport = Report(['ChirpLinMeasReport_' Time], DocType);
% Open the report to add contents
open(MeasReport);
Could you help to check if anything wrong?

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

답변 (1개)

Manikanta Aditya
Manikanta Aditya 2024년 1월 8일
Hi Ching,
As per my understanding, you are using MATLAB Report Generator to build and save a PDF project, then occasionally you are facing errors while closing the reports.
For the document close error, there should be a ‘*_FO’ directory created in the working directory when a report was created. If the creation of that report failed for some reason, that directory is remained and prevents additional reports using the same name. Deleting that directory might resolve this issue.
I would recommend you to try the following troubleshooting steps to see if you can resolve the issue at hand.
Memory Usage: The Report Generator software has two converters for generating documents. One uses Java heap memory and the other does not. To avoid Java heap memory issues, you can generate your report using the converter that does not use Java heap memory.
I recommend you to check the following references to know about:
Please refer to the following MATLAB Answer to know more about the issue at hand:
I hope this resolves the issue you were facing.

카테고리

Help CenterFile Exchange에서 MATLAB Code Analysis에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by