How to define new custom report/reporter for a custom docx system design report

3 views (last 30 days)
I am trying to build a custom system design report using a custom .dotx template. The template has a prebuilt title page with some holes for title, revision, date etc., as well as various quick parts with holes to be used for various sections/chapters to build the report.
In reading the "Define New Reporters" help doc, when defining a custom reporter and then specifying a template in the template library of the template file, the class definition should inherit the properties for the holes defined in the template. However I cannot seem to get the syntax right for this to happen and was wondering if someone could provide some example code to help me along. I am able to define a report and reporter subclasses, but I cannot get them to inherit the hole properties automatically.
In the end, I would like to be able to a) use a custom template which already has a title page built with text holes to be filled in, and b) use quick parts with text holes to be filled in in later sections or chapters.

Answers (1)

Dhruv
Dhruv on 27 Mar 2023
To define a custom reporter for a custom system design report using a custom .dotx template with prebuilt title page and various quick parts, try implementing following steps:
  1. Define a new reporter subclass and specify the template in the template library of the template file.
  2. Inherit the properties for the holes defined in the template by using the correct syntax.
  3. Use the text holes to be filled in for the title page and quick parts in later sections or chapters of the report.
Try using the correct syntax for inheriting the properties for the text holes defined in the template and ensure that the template is properly specified in the template library of the template file.

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!