Controlling elements being generated 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. Agilian 3.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.
- Create a project with Agilian. 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.

- Create a class diagram through the Diagram Navigator.

- Create a simple class diagram with three classes through diagram toolbar: Order, OrderLine and Product:

- Select Doc > Generate PDF Report... from the toolbar.

- Click on the drop-down menu of Template and select <New>.

- Enter Class Report as name for the template.

- Click on Add Diagram Loop from the toolbar.

- Double click on Class Diagram from the list at the right hand side to indicate the request for all class diagrams in project.

- From the diagram loop, click on Add Element Loop.

- 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.

- From the element loop, click on Add Property Value.

- Select Create Date Time from the list of properties.

- Click on Preview Template Content from the toolbar of template editor.

- 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.

- 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.

- 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.

- 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.

- To include the diagram or elements which being disabled, select the diagram that contains the class you need. Right click on Class Diagram1 and select Generate from the pop-up menu.

- Assume we only 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.

- Refresh the template again. You can see the Order and Product appear in the preview pane.

- After finish selecting those elements you want to generate, save the template by clicking Save on toolbar.

- Click Close at the bottom right corner of the dialog box.
- In the Generate PDF dialog box, specify an output path and click Generate at the bottom of dialog to generate a report.

- The following image is the generated report. Only Order and Product classes are generated, but not OrderLine class.

Rate this Article
Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).
One Moment Please
Thanks for rating this article.
Comments (0)