Customizing report data selection

When publishing a model report, you can customize the elements that are reported on by using Object Constraint Language (OCL) in the report manifest file.

To customize the data elements used in a model report, you can add OCL to an existing report or create a new report by editing the report manifest file, com.ibm.xtools.publish.uml2\resources\reports\reports.manifest.

To create a new report with customized data elements:

  1. Open the report manifest file for editing. This file is located at com.ibm.xtools.publish.uml2\resources\reports\reports.manifest.
  2. Create a new report by defining the following fields:
    <reportManifest name="Report Name" 
    	description="Text description of the report"
    	author="Your name" 
    	xsltFile="resources/reports/MetricsReport.xsl" 
    	oclSelfType="Class"
    	oclQuery="self.oclIsKindOf(Class)"
    	outFileExt="pdf"
    	USING_ICONS="false" 
    	EXTRACTING_DIAGRAMS="false" 
    	DIAGRAM_FORMAT="JPG"
    	DETAIL_LEVEL="FULL">
    </reportManifest>
    The oclSelfType and the oclQuery attributes, formatted in bold, define the data selection attributes. The oclSelfType attribute is the UML data type of the elements to select and the oclQuery attribute is the OCL query for refining the selection.
  3. Save the report manifest file.
  4. Run the product.
  5. Select a model to report on.
  6. Click Publish > Report.
  7. View your customized report.
Related tasks
Publishing model information reports
Viewing or printing the report
Canceling model publishing

Related information

Tutorials and sample for publishing models

Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.