Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
titleOn this page

Table of Contents

 

 

The Report Wizard dialog, see figure below, consists of 2 panes: Control buttons and Content Management Pane.

Report Wizard Dialog

Control Buttons

There are 4 control buttons:

  1. The  button is used for proceeding to the previous content management pane.
  2. The  button is used for proceeding to the next content management pane.
  3. The  button is used for generating a report.
  4. The  button is used for cancelling the report generation process.

Content Management Pane

This pane is used for managing the template content and includes the following sub-panes:

  • Template Management pane
  • Report Data Management pane
  • Select Element Scope pane
  • Generate Output pane

Click the or button to go to a specific pane.

Template Management Pane

The Template Management pane lists all report templates that you can use to generate your report in the Select Template sub-pane, see figure below.

Select Template Pane

Report Wizard provides predefined templates such as Use Case, Model Extension, Data Dictionary, IEEE 1233, Class Specification Diagram, Business Process Diagram, and Web Publisher templates. Choose the relevant template to manage or generate a report.

To select a template


  1. On the Tools menu, click Report Wizard. The Report Wizard dialog will open.
  2. In the Select Template pane, see figure above, select a template. A template description will be displayed in the lower part of the Select Template pane.

You can manage the template from the Template Management pane or click the Next button to go to the next step for generating the report.

This pane contains 8 buttons: (a) New, (b) Edit, (c) Delete, (d) Open, (e) Variable, (f) Clone, (g) Attach, (h) Import, and (i) Export.

(a)  button

The function of New button, see figure above, is to open the New Template dialog through which you can create a new template.

To create a new template


  1. In the Report Wizard dialog, click the New button. The New Template dialog will open, see figure below.
    New Template Dialog
  2. Enter the template name, description, and location of the new template in the New Template dialog.
  3. Click the  button. The Select Location dialog will appear, see figure below.
  4. Select the template file location and type. Enter the filename and click Select.
Field Name  Description  Default ValueType Required
NameEnter a new template
name.
BlankTextYes
DescriptionEnter a template
description.
Blank TextNo
Template fileSelect an RTF
template.
BlankText Yes
CreateCreate a new template
under the Template tree.
Disable--
CancelClose the dialog.Enable--
CategoryChoose the existing
category or enter a
new category name.
TextNo


Selecting Template File in the Select Location Dialog

(b)  button
The Edit button is used for editing a template and save it in Report Wizard.

To edit a template


  1. In the Report Wizard dialog, select a template and click the Edit button. The Edit Template dialog will appear, see figure below.
    Edit Template Dialog

  2. Edit the template name and description and locate the template file’s location.

 

Field Name DescriptionDefault ValueTypeRequired
NameEdit the template
name.
Existing nameTextYes
DescriptionEdit the template
description.
Existing description TextNo
Template fileChange the
RTF template.
Existing template fileTextYes
SaveSave the edited
template under the
Template tree.
Enable--
CancelClose the dialog.Enable--
CategoryChoose an existing
category or enter a
new category name.
Existing categoryTextNo

(c)  button

You can delete a template from Report Wizard by clicking the Delete button.

To delete a template


  1. In the Report Wizard dialog, select a template and click the Delete button. The Confirm delete dialog will appear, see figure below.
  2. Click either Yes to delete the selected template from the template list or No to cancel the operation.

   
    Confirm Delete Dialog

(d)  button
The Open button opens a template file in the default editor.

To open a template field in the default editor


  1. In the Report Wizard dialog, select a template and click the Open button. The template file will open in the default editor.

 

(e)  button

If you click the Variable button in the Template Management pane, the Template Variable dialog will appear, allowing you to create a new template variable and modify or delete an existing template variable.

Template Variable Dialog

Table listing of Variable Dialog Fields and Buttons

Field Name  DescriptionDefault Value Type  Required
Name Enter the
variable name.
BlankText Yes 
Value Enter the
variable
description 
Blank Text No 
New Create a new
template
description 
Blank Text No 
CancelClose the dialogEnable

-

 

The Template Variable dialog, see figure above contains Variable Pane and Control Buttons.    

Variable Pane

This pane consists of a report description table and the Variable Value text box. The first column of the table is the variable name, and the second column is the variable value. You can use the Variable Value text box or the second column of the table to view the value of a selected variable. To edit the value, please do so in the second column of the table.

Control Buttons

There are two control buttons in the Template Variable dialog: OK and Cancel.

To create a new variable


  1. In the Template Variable dialog, click the New button. The New Variable dialog will appear, see figure below.

    New Variable Dialog

  2. Enter the variable name and value. Next, select an owner for this new variable from the Owner drop-down list and then click Create. You will see the newly-created variable’s name and value in the Variable pane.

  3. In the Template Variables dialog, click OK.

You can modify a variable value in either the (i) Variable pane or (ii) Variable Value dialog.

(i) To modify a value in the Variable pane


  • Click a variable name column in the Variable pane and modify the variable value in the table.

    Modifying a Variable Value in the Variable Pane

(ii) To modify a variable value in the Variable Value dialog


  1. Click a variable value column in the table in the Variable pane and click the  button, see first figure below. The Variable Value dialog will appear, see second figure below.
    Edit template variable value

  2. Modify the variable value and click OK, see figure below.

    Variable Value Dialog 
     
  3. When you finish modifying variables and their values in the Template Variable dialog, click either OK to confirm the changes or Cancel to discard them.

You can enter the value of a report variable in either plain text or HTML. You can switch from plain text to HTML or vice versa by selecting the HTML check box in the Variable Value dialog, see figure below.

Entering Report Variable Value in HTML
    
 To delete a variable


  1. Select a variable in the table and click the Delete button. The Question dialog will appear prompting you for confirmation before deleting the selected variable.
  2. Click Yes to delete the selected variable, see figure below.
    Deleting A Variable

(f)  button

Click the Clone button to clone a template.


To clone a template


  1. In the Report Wizard dialog, select a template and click the Clone button. The Clone Template dialog will appear.

    Clone Template Dialog

  2. Enter the name and description. The name of the cloned template should begin with Copy of (name of template).

  3. Click the Create button to clone the template.

                                                 Table listing of Clone Template Dialog Fields and Buttons

Field NameDescriptionDefault ValueTypeRequired
NameEnter a new
template
name.
Copy of the
selected
template name
TextYes
DescriptionEnter the
template
description.
Existing
description
TextNo
CreateCreate a
template.
Enable--
CancelClose the
dialog.
Enable--

 

(g)  button

Clicking the Attach button makes a copy of the currently selected template and adds it to the project’s files, so anyone with access to the project can run generate a report.

To attach a template


  1. Select Template on Report Wizard dialog.
  2. Click Attach button.

Step on how to attach template

The new template will be created and display on Report Wizard dialog and containment tree.


Result of attaching a template on Report Wizard

Result of attaching a template on containment tree

You can right-click on the attached template in containment tree and then select Generate Report{attached template name} to open Report Wizard dialog.

Open Report Wizard dialog via attached template in containment tree

Attach button changes to Extract

On the Report Wizard dialog, when you select the attached template, the  button will be changed to  button.

To edit an attached report template , extract it to the local report templates folder (click Extract). After you finish the editing, re-attach the updated report template to your project (click Attach).

To extract a template


  1. Select an attached template on Report Wizard dialog.
  2. Click Extract button, see first figure below.
  3. If the template already exists in the local report template folder, a confirmation dialog will be displayed, see second figure below. Click the Yes button to extract the template.
  4. The attached template will be extracted to local template, see third figure below.

    Step on how to extract template

    Confirmation dialog when you perform extract template
    Local template


Tip

You can remove an attached template from a project by selecting the attached template and then clicking the Delete button.

(h) button

Click the Import button to import a template.

To import a template


  1. In the Report Wizard dialog, click the Import button. The Select Location dialog will appear, see figure below.

    Select Location Dialog

  2. Select a Report Wizard template with the filename extension *.mrzip and click Open. The following Message dialog will open, see figure below.

    Message Dialog of Successful Import

(i)  button

Click the Export button in the Report Wizard dialog to export a template.

To export a template


  1. In the Report Wizard dialog, select a template and click the Export button. The Select Location dialog will open, see figure below.

    Select Location Dialog

  2. Select a directory or folder where you want to export the template.

  3. Type the filename and click .

  4. The following Message dialog will open, see figure below. Click OK.

    essage Dialog of Successful Export

Report Data Management Pane

A Report Data is a collection of variables. You can create a Report Data and organize its variables through the Report Data Management pane in the Report Wizard dialog. You can now create a Report Data as an element in the Containment tree inside a MagicDraw project with the use of profiles, allowing you to commit the Report Data to Teamwork Server and share it with other users.

You can also create child variables under any variables. This will help you organize information into groups, keep revision history, and many more.

The figure below shows the Report Data Management pane in the Report Wizard dialog.

Report Data Management Pane

Use the Report Data Management pane to select and organize a Report Data and its variables. Report Wizard provides a built-in Report Data for every predefined template. A detailed description of the Report Data will be displayed in the Select Report Data pane.

The Report Data Management pane allows you to


  • create, edit, delete, or clone a Report Data
  • create or organize variables in a Report Data.

The Report Data Management pane contains several buttons: (a) New, (b) Edit, (c) Delete, (d) Clone, and (e) Variable buttons, see figure above. These buttons can help you create a Report Data and its variables.

(a)  button

Click the New button to create a new Report Data, see figure above.

To create a new report


  1. Click the New button. The NewReport Data dialog will appear, see figure below.
    New Report Data Dialog
  2. Enter a new report name and description, and then click Create.

                               Table listing of New Report Data Fields and Buttons

Field Name Description Default ValueTypeRequired
NameEnter the
report’s
name.
BlankTextYes
Description Enter the
report’s
description.
BlankTextNo
Create Create the
report.
Disable--
Cancel Close the
dialog.
Enable--

(b)  button

Click the Edit button to edit a Report Data.

To edit a Report Data


  1. Click the Edit button. The Edit Report Data dialog will appear, see figure below.
    Edit Report Data Dialog

  2. Edit the report’s name and description, and then click .

                                  Table listing of Edit Report Data Dialog Fields and Button

Field NameDescriptionDefault ValuePossible ValueRequired
NameEdit the
report’s
name.
Existing
Name
TextYes
DescriptionEdit the
report’s
description.
Existing
Description
TextNo
SaveSave the
report.
EnableEnable/Disable-
Cancel Close the
dialog.
EnableEnable/Disable-

 (c)  button

Click the Delete button to delete a Report Data.

To delete a report


  1. Click the Delete button. The Confirm delete dialog will appear, see figure below.    
    Confirm Delete Dialog
  2. Click either Yes to delete the selected data or No to cancel the operation.

(d)  button

Click the Clone button to clone a Report Data.

To clone a report


  1. Click the Clone button. The Clone Report dialog will appear, see figure below.
    Clone report data

  2. Enter the name and description of the report. The name should begin with Copy of (cloned report name).

  3. Click the Create button. The cloned Report Data will then be created, see figure below.

                                           Table listing of Clone Report Dialog Fields and Buttons

Field Name  Description Default Value  Type Required 
NameEnter the
report
name.
Copy of the
selected
report name
TextYes 
Description Enter the
report
description. 
Existing
Description 
Text No 
Create Create the
clone
report. 
Enable 

Cancel Close the
dialog. 
Enable 

Tip

Whenever a cloned Report Data is created, a copy of the Report Data (variable) will also be created.

Copy of My Report Created in the Report Data Management Pane

(e)  button

Click the Variable button to create a new variable.

To create a new variable


  1. Click the Variable button. The New Variable dialog will then open.
  2. Type the variable name and value, and then click Create.

You can create report data in either (i) Report Wizard where all data will be saved into an XML file or (ii) a MagicDraw project, in which case the report data will be saved with the project itself. Saving report data in a project will enable you to commit the report to Teamwork Server.

Creating a Report Data in Report Wizard

To create report data in Report Wizard


  1. Open the Select Report Data pane.
  2. Click the New button, see figure below.

    Creating Report Data in Report Wizard

  3. Enter the new report’s name and description in the New Report Data dialog, see figure below.

    New report data dialog
  4. Click Create.

Creating a Report Data in a MagicDraw Project

Before creating report data in a MagicDraw project, you need to use a report profile, Report Profile.mdzip, which is located in the <install.root>\profiles folder.

To use a report profile (Report Profile.mdzip)


  1. Click File > Use Project on the MagicDraw main menu, see first figure below. The Use Project dialog will open and the project module path <install.root>\profiles will be selected by default, see second figure below.

    The Use Project Menu

    The Use Project Dialog

    Selecting Project Module Path

  2. Select Report Profile.mdzip and click Finish. The “Report Profile” profile will open in the Containment tree as a read-only profile. You can now use it in your project.

To create a Report Data in a MagicDraw project


  1. Use Report Profile.mdzip in your MagicDraw project.
  2. Right-click a data model in the Containment tree and select Create Element > Report Profile > Report Data from the shortcut menu, see figure below.

    Creating Report Data in MagicDraw Project 
     
  3. Type the name of the Report Data element in the Containment tree.
     
Tip

You can right-click a data model, a package, or a profile in the Containment tree to create a Report Data.

Table listing of Tag Values of Report Data

Tag Values Function
autoImageSizeChange the image size.
imageFormatSelect an image format,
either JPEG or PNG.
emptyTextStore a string value that will be
replaced with an empty variable.
dataContain elements that will be
published by Report Wizard.
templateDetermine which template to
use a particular Report Data.
generateRecursivelyDetermine whether or not a
report will be generated recursively.

Creating and Modifying Report Data Variables

Variables are created because some information is not “naturally” contained in a model such as the company's name, author's name, revisions, and many more. Although you can put all the information in a model's specification (Document/Hyperlinks in the Specification dialog), it is very hard and tedious to get data from the model's specification, as this results in more lines of codes and scripts in the report templates. Therefore, instead of writing lines of codes, you can simply create a variable, give it a name, and call it directly from the template. For example, you can create a variable called “Author” in Report Wizard and write $Author in the template. When you generate the report, you will see the value inside “Author.” In short, a variable is used to represent data, which you want to include in the report, not in the model.

Variables contain information that you want to store in a project, such as names and dates.

To create a variable for a Report Data


  1. Right-click a Report Data in the Containment tree and select Create Element > Variable, see figure below. The variable will appear inside the Report Data.

    Creating Variable for Report Data

You can also create, edit, and delete variables through the Report Variable dialog in Report Wizard.

To open the Report Variable dialog


  1. Click Tools > Report Wizard on the MagicDraw main menu.
  2. Select a report template and click , see figure below.

    Opening Report Wizard Dialog

  3. Either create (with the New button) or select a Report Data and click the Variable button, see first figure below. The Report Variable dialog will open, see figure below.

    Opening the Variable Dialog

    The Report Variable Dialog

To create a variable in Report Wizard


  1. Open the Report Variable dialog.
  2. Click New. The New Variable dialog will open. Fill in the variable name and description, see figure below. You can create either (i) a parent variable or (ii) a child variable in the Owner box.

New Variable Dialog

(i) To create a parent variable, type the variable name in the Name box, enter the description, select an empty value in the Owner box, and then click Create  see figure below.

Creating a Parent Variable

(ii) To create a child variable, type the variable name in the Name box, enter the description, select Parent in the Owner box, and then click Create, see figure below.

Creating a Child Variable 

     3.  The new variable will appear in the table in the Report Variable dialog.

     4.  Click OK to save the variables in the Report Data.

To edit a variable in Report Wizard


  1. Open the Report Variable dialog.
  2. Double-click the column next to the variable name column and click the  button, see figure below. A dialog will open for you to edit the variable value.

    Editing Variables
  3. Click OK. The new variable value will appear in the column next to the variable name column.

To delete a variable in Report Wizard


  1. Open the Report Variable dialog.
  2. Click a variable in the table, and then click Delete. A dialog will open prompting you for confirmation before deleting the selected variable, see figure below.

    Deleting Variable
  3. Click Yes, and the variable will be deleted.

Including Variables in a Template

When you include the variables you have created in a template, you will have each variable value included in the generated report. This section will use the following Report Data as an example.

Sample of Report Data
 

 To get the value of a top-level variable


  1. Open a blank document in Microsoft Word.
  2. Type: $Parent, see figure below.

    Referencing to Parent Variable in the Template

  3. Save the file as “sampletemplate.rtf”. Choose Rich Text Format (*.rtf) as the file type, see figure below.

    Saving Template as .rtf File in Microsoft Word

  4. Open the Report Wizard dialog and create a new template with the New button. The New Template dialog will open.

  5. Type the name and description of the new template. Click the  button to select “sampletemplate.rtf” as the template file.

  6. Click Create > Next. The Select Report Data pane will open.

  7. Select My Report Data and click Generate to generate a report. The output of the generated report will be as shown in figure below.

 

To get the value of the child of a variable


  1. Open a blank document in Microsoft Word.
  2. Type any of the following to print a child variable, see figure below.
    (i) $Parent.get(10): to get a child value by index.
    (ii) $Parent.get(“Child”): to get a child value by name comparison.
    (iii) $Parent.Child: to get a child value by referencing its name (in this case “Child”).

    Image Modified

  3. Save the file as “sampletemplate.rtf”. Choose Rich Text Format (*.rtf) as the file type.

  4. Open the Report Wizard dialog and create a new template by clicking the New button. The New Template dialog will open.

  5. Type the name and description of the new template. Click the  button to select “sampletemplate.rtf” as the template file.

  6. Click Create > Next. The Select Report Data pane will open.

  7. Select My Report Data and click Generate to generate a report. The output of the generated report will be as shown in figure below.

Select Element Scope Pane

The Select Element Scope pane, see figure below, allows you to select the scope of MagicDraw data to generate a report.

Select Element Scope Pane

The table below describes the detail of each component in the Select Element Scope pane.

Component Name Description 
All data treeSelect the desired packages from the All data
tree then add them to the Selected objects tree.
Selected objects treeSelect packages and click the Add, Add All, or
Add Recursively button. The selected packages
will be added to the Selected objects tree.
Add buttonSelect packages and click Add. The selected
packages will be added to the Selected objects tree.
Add All buttonSelect packages and click Add All. The selected
packages and the elements directly owned by those
packages will be added to the Selected objects tree.
Add Recursive buttonSelect packages and click Add Recursively. The
selected packages and its recursive packages will
be added to the Selected objects tree.
Remove buttonSelect packages and click Remove. The
selected packages will be removed from
the Selected objects tree.
Remove All button

Click Remove All and all packages in
the Selected objects tree will be removed.

 

You can perform the following operations in the Select Element Scope pane:

(i) Add packages into the selected object tree.

(ii) Remove a selected package from the selected object tree.

(iii) Select or clear the Generate Recursively option.

(iv) Show auxiliary resources.

(v) Show only package elements.

(i) To add packages


    • In the Select Element Scope pane, see figure above, select the packages from the All data tree and click Add, Add All, or Add Recursively to add them into the Selected objects tree.

(ii) To remove packages


    • In the Select Element Scope pane, see figure above, select the packages from the Selected objects tree and click Remove or Remove All to remove them from the Selected objects tree.

(iii) To select or clear the Generate Recursively option


    • Select or clear the Generate Recursively check box in, see figure above.

(iv) To show auxiliary resources


    • Select or clear the Auxiliary Resources check box in, see figure above.

(v) To show only package elements


    • Select or clear the Show Only Package Element check box, see figure above.
       
Tip

The figure above shows the UML 2 Elements package and the Generate Recursively check box were selected. It means that the UML 2 Elements package and its subpackages will be generated in the report.

Generate Output Pane

The Generate Output pane in Report Wizard allows you to configure report files, for example, to select the report files’ output location and image format and to display the report in the viewer, see figure below.

Generate Output Pane

The table below describes the function of each option in the Generate Output pane of Report Wizard.

Component Name Description
Report FileShow the report file’s location and name. The default
report location will be \data\template_folder\reports\.
The default report name will be the same as the
report name defined by the user. 
buttonOpen the Select Location dialog in order to locate
the report file.
Report Image Format

Select an image format for your report: JPG, PNG,
SVG, EMF
, or WMF.

Note:

    • Use *.JPG and *.PNG for any template format.
    • Use *.SVG for text and HTML templates. 
    • Use *.EMF and *.WMF for text and Microsoft Office
      templates
      (RTF, DOCX, XLSX, and PPTX).
Auto image size

Change the size and orientation of an image before
inserting it into a document.
There are 4 options available:

    • No Resize:
      Image will not be resized or rotated.
    • Fit image to paper (large only):
      Large image will be fitted within the paper size.
    • Fit and rotate (clockwise) image to paper (large only):
      Large image will be fitted within the paper size and rotated clockwise.
    • Fit and rotate (counter-clockwise) image to paper (large only):
      Large image will be fitted within the paper size and rotated counter-clockwise.
Display empty value as
    • Empty text:
      Leave an empty value of the report output blank.
    • Custom text as:
      Enter a custom value for an empty value. The default value is NA.
Display in viewer
after generating report
Display a complete report in the viewer. Otherwise,
the report will be created and kept in a selected location.
GenerateGenerate a report.
CancelCancel the report generation process
and close the Report Wizard dialog.
HelpProvide the Help content.
Tip
    • Displaying an empty value with a text feature (displaying empty value as) was deprecated. This feature will be removed in the next version of MagicDraw. Alternatively, you can select one of the following two options.

(i) Use a template code to replace empty value with text. For example: Using normal code.

#if (!$var || $var == "")
Empty
#end

Using macro code.

#macro (replaceNullValueWithText $var)
#if (!var || $var == "")
EMPTY
#end
#end


(ii) Use report wizard environment option to configure empty.

Add the property “template.output.on.blank.field” and value in the Report Wizard Environment option to enable this feature. The value of this property will be inserted in the generated output when the variable is empty (see Report Wizard environment options)