Report Wizard can automatically import a Template Tool to a template without having to declare the #import statement in a template code manually (see Importing Custom Tool to Template).
To enable Report Wizard to automatically import a Template Tool, you have to use the existing template variable inside “template.xml” and “report.xml”.
Add "com.nomagic.magicreport.engine.Tool" to a type value where the name is a variable name and the value is a full-qualified template tool class, for example:
To automatically import TextTool
Edit the built-in.xml file in the ...\data\reports\Tutorial 24 - Text Tool\reports.
Add a variable as shown in the following example.
<variable>
<name>text</name>
<description>A text tool</description>
<type>com.nomagic.magicreport.engine.Tool</type>
<value xml:space="preserve">com.nomagic.reportwizard.tools.TextTool</value>
</variable>
CODE
The result is a template code that can access com.nomagic.reportwizard.tools.TextTool from $text.
$text.noLineBreak($diagram.name)
Once you have edited a template variable, you have to restart the application prior to generating a report through the modeling tool.