Control Elements to Generate in Report

Report template helps you to customize the output of generated report. When you generate report with report template, all the model/diagram elements in the project that fit in the template definition will be generated in the report. In some cases, you might want some specific elements to appear in report only. Visual Paradigm for UML (VP-UML) 8.0 supports customizing elements in report template, therefore, you are able to generate report with this enhancement. In this tutorial, you will see how to select elements to generate to report with your preference.

August 16, 2010
User Rating: / 1
Views: 2,319
PDF Link Add comments
Edition: Standard or above (Edition comparison)

  1. Create a project with VP-UML. Select File > New Project from the main menu. In the New Project dialog box, enter My Project as project name and click Create Blank Project.
    new project
  2. Create a class diagram through the Diagram Navigator.
    create class diagram
  3. Create a simple class diagram with three classes through diagram toolbar: Order, OrderLine and Product respectively:
    create class
  4. Select Doc > Generate PDF Report... from the toolbar.
    generate PDF report
  5. In the Generate PDF dialog box, click on the drop-down menu of Template and select <New>.
    new report template
  6. In the Report Template dialog box, enter Class Report as name for the template.
    name report
  7. Click on Add Diagram Loop from the toolbar.
    add diagram loop
  8. Double click on Class Diagram from the list at the right hand side to indicate the request for all class diagrams in project.
    select class diagram
  9. From the diagram loop, click on Add Element Loop.
    add element loop
  10. Double click on Class from the list of elements at the right hand side to indicate the request for all classes in the class diagrams.
    select class
  11. From the element loop, click on Add Property Value.
    add property value
  12. Select Create Date Time from the list of properties.
    select created date time
  13. Click on Preview Template Content from the toolbar of template editor.
    preview template content
  14. The preview pane appears at the bottom of editor. You can preview all three created classes. The report you are going to generate will be exactly the same as the one in preview.
    preview pane
  15. If you don't want the newly created elements being generated in your report, you can click Options button on the toolbar of template editor.
    options
  16. Check the option Default disable newly created elements in the Options dialog box. By default, when you create elements (e.g. class, use case...) in your project, they will automatically be generated to a report inasmuch as they match the template definition. By checking this option, those newly created elements will not be generated to report automatically. If you want them to appear in report, you need to enable them manually. Click OK to confirm the change.
    disable newly created elements
  17. Click on the Refresh button in template pane, so that the preview pane will be updated. You can see that those three classes are all disabled in preview pane. No matter how many classes you draw on diagram now, they will all be disabled in the preview since you have selected the option in step 16. This gives you the chance to select your desired elements in report.
    refresh preview
  18. Select the diagram that contains the class you need. Right click on Class Diagram1 and select Generate from the pop-up menu.
    generate diagram
  19. We want Order and Product to appear in report. Select Order, and then press the Ctrl key and select Product. Right click on the selection and select Generate from the pop-up menu.
    generate classes
  20. Refresh the template again. You can see the Order and Product appear in the preview pane.
    selected classes
  21. After finish selecting those elements you want to generate, save the template by clicking Save on toolbar.
    save report template
  22. Click Close at the bottom right corner of the dialog box.
  23. In the Generate PDF dialog box, specify an output path and click Generate at the bottom of dialog to generate a report.
    report output path
  24. The following image is the generated report. Only Order and Product classes are generated, but not OrderLine class.
    report is generated

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