This is the third article of a series of articles about M2Doc as a new technology to generate Word reports out of medini models. You can find additional extensions (beta status) for 2022 R1 and 2022 R2 in our extension area on the online support page. An official release is planned for 2023 R1. All samples posted here are for 2022 R2. Main intention is to make you aware of the new technology but also to get any kind of feedback.
The third sample is about templates, an own m2doc mechanism to deal with repetitive elements and define nice word snippets (templates) inside the m2doc report. The required m2doc expressions are again very simple:
{ m:template something(a: Integer)}
here goes the template stuff with nice formats
{ m:endTemplate }Cool is that you can now put arbitrary word stuff inside the template and use it at any other location. The attached sample just illustrates the usage with a few very basic ideas, but does not reveal the full power yet. The project also contains a few things that do not work as expected or are not yet finished, precisely how to work with collections passed into a template, but see for yourself.
Happy Reporting
Jan