Report Wizard provides predefined report data templates that you can use to generate a report. The built-in report data template consists of several report data variables such as title, author, scope, and purpose that you can modify and adjust to meet your needs. You can also create a new report data template as needed, and manage the variables using the report data management pane.
This section defines report data, and how to use it in your report to represent variables that you want to include. Click the following links to navigate to the content of this page.
A report in Report Wizard has a collection of variables which are called report data. Report Wizard provides a built-in report data for every predefined template. The built-in report data comes with predefined variables and values which you can edit or delete. You can also add more variables to the built-in report data.
Image Modified
The built-in report data's predefined variables and values in Report Wizard.
You can create your own report data, and add variables and child variables under it if you do not want to use the built-in one. Report Wizard also allows you to create a report data as an element in the Containment tree inside a MagicDraw project by using the Report Profile which allows you to commit the Report Data to Teamwork Server, and share it with other users.
Anchor
Reportdatapane
Reportdatapane
Report Data Management Pane
Report Wizard stores the built-in report data in the Report Data management pane which helps you to organize information into groups, and keep revision history created in a MagicDraw project.
This pane also allows you to:
Create, edit, delete, or clone a Report Data.
Create or organize the variables in a Report Data.
Image Modified
Selecting the built-in report data in the Report Data management pane.
The following table lists the buttons and their function in the Report Data management pane.
Button
Function
Image Modified
Creates report data.
Image Modified
Edits report data.
Image Modified
Deletes report data.
Image Modified
Clones report data.
Image Modified
Creates a report variable.
Anchor
WorkingwithReportdata
WorkingwithReportdata
Working with Report Data
You can create report data either in:
Report Wizard in which all data will be saved into an XML file.
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.
The following instructions show you how to create and manage your report data in Report Wizard and in a MagicDraw project.
Expand
title
How to create a
To create report data in Report Wizard
Click Tools > Report Wizard.
Select a template and click Image Modified.
Click Image Modified. The New Report Data dialog will appear.
Image Modified
Creating a Report Data in the New Report Data dialog.
Enter a new report name and description, and then clickImage Modified.
Expand
title
How to create a report data in a MagicDraw project
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.
How to
To use a report profile (Report Profile.mdzip)
On the MagicDraw main menu, click File> Use Project > Use Local Project. The Use Project dialog will open, and the project module path <install.root>\profiles will be selected by default.
Image Modified
The Use Local Project menu opens the Use Project dialog that contains a report profile you need before creating a report data in a MagicDraw project.
Image Modified Selecting a project module path for the report profile and Report Profile.mdzip in the Use Project dialog.
Select Report Profile and click Image Modified.
Specify the usage options.
Image Modified
Usage Options.
Click Image Modified. The “Report Profile” profile will open in the Containment tree as a read-only profile. You can now use it in your project.
Anchor
create new report data in MD project
create new report data in MD project
How to
title
How to edit a
To create a Report Data in a MagicDraw project
Use Report Profile.mdzip in your MagicDraw project.
Right-click a data model in the Containment tree and select Create Element.
Image Modified
Creating Report Data in the MagicDraw project
Select Report Data from the menu.
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.
Tag Values
Function
autoImageSize
Change the image size.
imageFormat
Select an image format, either JPEG or PNG.
emptyText
Store a string value that will be replaced with an empty variable.
data
Contain elements that will be published by Report Wizard.
template
Determine which template to use in a particular Report Data.
generateRecursively
Determine whether or not a report will be generated recursively.
Expand
To edit report data
Click Tools > Report Wizard.
Select a template and click Image Modified.
Click Image Modified. The Edit Report Data dialog will appear.
Image Modified
Editing a report data in the Edit Report Data dialog
Edit the report’s name and description, and then click Image Modified.
Expand
title
How to delete a
title
How to clone a
To delete report data
Click Tools > Report Wizard.
Select a template and click Image Modified.
Click Image Modified. The Confirm delete dialog will appear.
Image Modified
The Confirm delete dialog.
Click either Image Modified to delete the selected data or Image Modified to cancel the operation.
Expand
To clone report data
Click Tools > Report Wizard.
Select a template and click Image Modified.
Click Image Modified. The Clone Report dialog will appear.
Image Modified
Cloning a report data in the Clone Report dialog.
Enter the name and description of the report. The name should begin with Copy of (cloned report name).
Click Image Modified. The cloned Report Data will then be created.
Image Modified
The Copy of My Report created in the Report Data Management pane
.
Tip
When a cloned Report Data is created, a copy of the Report Data (variable) will also be created.
Anchor
WorkingwithReportvariables
WorkingwithReportvariables
Working with Report Data Variables
Variables are created because some information is not “naturally” contained in a model, e.g. the company's name, author's name, revisions. Although you can put all of the information in a model's specification (Document/Hyperlinks in the Specification dialog), it is difficult 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.” Essentially, a variable is used to represent data that 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. You can create a report variable in a MagicDraw project or the Report Wizard dialog.
Expand
title
How
title
How to
To create a report variable in a MagicDraw project
Right-click a Report Data in the Containment tree and select Create Element > Variable. The variable will appear inside the Report Data. Image Modified
Creating a variable for Report Data in the Containment tree.
You can also create, edit, and delete variables through the Report Variable dialog in Report Wizard.
Expand
To create a report variable in the Report Wizard dialog
Open the Report Variable dialog.
Click Image Modified. The NewVariable dialog will open. Enter the variable name and description. You can create either a parent variable or a child variable in the Owner box.
Image Modified Creating a new variable in the New Variable dialog.
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 Image Modified. Image Modified
Creating MyNewVariableName as a parent variable.
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 Image Modified. Image Modified Creating a child variable of MyNewVariableName
title
How to
.
3. The new variable will appear in the table in the Report Variable dialog.
4. Click Image Modified to save the variables in the Report Data.
Expand
title
How to
To edit a report variable
Open the Report Variable dialog.
Double-click on the column next to the variable name column and click Image Modified. A dialog will open in which you can edit the variable value.
Image Modified
Editing a variable in the Template Variable dialog
Click Image Modified. The new variable value will appear in the column next to the variable name column.
Expand
To delete a report variable
Open the Report Variable dialog.
Click a variable in the table, and then click Delete. A dialog will open prompting you to confirm before deleting the selected variable.
Image Modified
Dialog to confirm the deletion of a report variable
Click Image Modified and the variable will be deleted.
Expand
title
How to
To get the value of a top-level variable
Open a blank document in Microsoft Word.
Type: $Parent.
Image Modified
Referencing to a parent variable in the template.
Save the file as “sampletemplate.rtf”. Choose Rich Text Format (*.rtf) as the file type.
Open the Report Wizard dialog and click Image Modified to create a new template. The NewTemplate dialog will open.
Type the name and description of the new template. Click Image Modified to select “sampletemplate.rtf” as the template file.
Click Image Modified >Image Modified. The Select Report Data pane will open.
Select a report data, in this example, My Report Data and click Image Modified to generate a report. The output of the generated report will be shown as in the following figure. Image Modified
The resulting RTF file
Note
title
Note
When you include the variables you have created in a template, each variable value will be included in the generated report. This section will use the following My Report Dataas an example.
Image Modified
Expand
My Report Data as an example.
To
title
How to
get the value of the child of a variable
Open a blank document in Microsoft Word.
Type any of the following to print a child variable.
(i) $Parent.get(1) 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
Referencing to the child variable in the template
Save the file as “sampletemplate.rtf”. Choose Rich Text Format (*.rtf) as the file type.
Open the Report Wizard dialog and click Image Modified to create a new template. The New Template dialog will open.
Type the name and description of the new template. Click Image Modified to select “sampletemplate.rtf” as the template file.
Click Image Modified > Image Modified. The Select Report Data pane will open.
Select a report data, in this example, My Report Data and click Image Modified to generate a report. The output of the generated report will be shown as in the following figure.
Image Modified
The resulting RTF file
Panel
title
On this page
Table of Contents
Glossary
.
Glossary
Expand
title
Clone To clone is to create an exact copy of report data.
expand
title
RTF Rich Text Format (RTF) is a file format developed by Microsoft that can be used with different word processors in different operating systems.
Sample model
View file
name
Magic Library.mdzip
height
250
More information about working with reports in Report Wizard
To learn more about reports in Report Wizard, you can visit the following pages: