Generate Microsoft Word 2007 Report for Class Model

Report generation lets you produce a report of diagrams with specification of both diagrams and model elements. In this tutorial, we will try to generate a MS Word report for a simple Class diagram. Further to generating a report, we will define a template file to be used in report generation.

May 12, 2010
User Rating: / 1
Views: 3,292
PDF Link Add comments
Edition: Standard or above (Edition comparison)

Part I - Developing styles template in MS Word

For MS Word report generation, you can supply a template file, which is a Word file provided by user. and contains the definition of styles as well as the content to append to the beginning of the generated report. You can prepare a Word document with a customized cover page, save it and apply it in report generation. In this part, we will create such a template file. If you do not have MS Word installed, you can skip this part and proceed with part II.

  1. Create a new MS Word document
  2. Insert a cover page.
    insert cover page
  3. Edit it.
    edit cover
  4. Changes the styles to be used by generated report. Modify Heading 1 first.
    to modify style
  5. Change the properties such as font color and font family. However, do NOT change the style name Heading 1.
    modify heading one
  6. Repeat step 4 and 5 to change style Heading 2.
  7. Save the document as my_template.docx.

Part II - Generating Word report

In this part, we will create a simple Class Diagram and proceed with report generation. We will make use of the style template created in Part I. If you are unable to complete Part I, please download the template file attached with this tutorial.

  1. Start VP-UML. Select a new workspace folder.
  2. Create a new Class Diagram through the Diagram Navigator. Name the diagram Domain Model.
    create class diagram
  3. Draw the diagram as shown below. The content is not particularly important because this tutorial is aimed to cover the steps about report generation. You may draw a different diagram if you like.
    simple class diagram
  4. To generate a Word report, select Tools > Report > Generate Word Report... from the main menu.
    to gen word report
  5. In the Generate Word report dialog box, specify the output path of the report file.
    specify output path
  6. Select Class Diagram Domain Model to generate to report.
    select diagram
  7. At the bottom of the dialog box, check Word Template and select the file path of the template you have created in Part I.
    specify word template
  8. Click Generate at the bottom right corner to start the generation.
  9. Open the generated report file and walk through it. The style template is applied and you can see the cover page as well as the styles defined.
    word generated

Resources

  1. my_template.docx

Rate this Article

Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).

You may be interested in

  1. Writing Effective Use Case
  2. UML Package Diagram
    Tagged:
  3. Draw Entity Relationship Diagram (ERD)
    Tagged:
  4. Produce UML Use Cases from Business Process Diagram (BPD)
  5. Draw UML Sequence Diagram with Keyboard
Tags of this article:

Comments (0)

Write comment

Rating

Comment

Enter the calculation result

security code