Report writer - making templates documentation


I am looking for way of customizing reports. I figured out that it is possible to play with templates (C:\Program Files\VP Suite 3.3\resources\Report\Default). It is verrrry good! I am sad that I didnt know it before.

But there is still one big problem - I cannot find any documentation about syntax of templates. It is not so easy to guess the syntax.

Is there any documentation about it?

Thank you!

Hi Drulle,

Thanks for your post. I’m sorry that the customizing template for Report Writer is not a formal published feature, but you can always contact us if you have any question.

Best regards,
Lilian Wong

Hi Lilian!

What a pity:(
But anyway, perhaps it is possible to get at least some kind of “unofficial” bits of documentation or notes about it (I understand it is not officially published feature, but it could save me a lot of effort. Analysis tools are not so efficient without powerful reporting facilities.)?

Here are some questions I have at the moment:

  • What are purpose of and blocks ?
  • How to use and ? What other these kind of blocks I can use?
  • What are differences between and ?
  • What is purpose of ?
  • How does works? Does it check if current object has at least one attribute? What is flag?
  • Is it similar for ?
  • Is there any way to find out parent of current object?
  • What is purpose for ?
  • Is there any way to sort object in “iteration loop” ? For example - I want make list of all Classes that are sorted by Packages and their Classes and then Classes that are not in Packages.

Thank you!


Hi Ingus,

Thanks for your reply. First of all, I would like to know more about your last question:

  • Is there any way to sort object in “iteration loop” ?..
    Which model’s template do you want to customize?

And below are the answers for all your remaining questions:

What are purpose of and blocks ?
ElementBaseInitiationBlock represents the xmlNodes inside ElementBaseInitiationBlock is working for Model.
DiagramBaseInitiationBlock represents the xmlNodes inside DiagramBaseInitiationBlock is working for Diagram.

In addition, ElementBaseInitiationBlock and DiagramBaseInitiationBlock can be seen as entrances of the template content. Without them, the template will result in no content. If user is writing templates for model elements, ElementBaseInitiationBlock should be used. For diagram, DiagramBaseInitiationBlock should be used.

How to use and ? What other these kind of blocks I can use?
There are “ForEachSimpleRelationship”, “ForEachRelationshipEnd”, “ForEachSubDiagram”, “ForEach”, “IteractionBlock”
about ForEachSimpleRelationship and ForEachRelationshipEnd, need to understand what is SimpleRelationship, what is EndRelationshipa nd RelationshipEnd first
SimpleRelationship is the relationship which has no from/to ‘end’, e.g. Generalization, Dependency, etc…
EndRelationship is the relationship which has from/to ‘end’, e.g. Association.
RelationshipEnd is the ‘end’ of EndRelationship. Basically, it has properties “name”, and “direction [from/to]”, and some RelationshipEnd will have more properties. e.g. AssociationEnd (Association’s ‘end’) has Multiplicity, Navigable, etc…

ForEachSimpleRelationship: (refer: …/Report/Default/Class/Abstractions.xml)

  • used to iterate the SimpleRelationship of a Model.
    @type [Generalization, Dependency, Abstraction, etc…], which type of SimpleRelationship will be iterated
    @direction [all/from/to], iterate from or to or both from/to SimpleRelationships (‘from’ means the SimpleRelationship is connected from this model to other model)
    @ignoreParagraphBreakForLastModel [true/false], if false, will add paragraph break after generated for the last SimpleRelationship. (default value is false)

ForEachRelationshipEnd: (refer: …/Report/Default/Class/Association.xml)

  • used to iterate the RelationshipEnd of a Model. PS: iterate the RelationshipEnd, not iterate EndRelationship.
    @type [AssociationEnd, MessageEnd (SequenceDiagram’s message), etc…], which type of RelationshipEnd will be iterated
    @endPointer [self/other/both], iterate the RelationshipEnd that refer to this model or other model. (‘self’ means the RelationshipEnd connects to this model no matter which direction, refer to capture01.png)

ForEachSubDiagram (refer: …/Report/Default/Class/SubDiagrams.xml and …/Report/Default/Subtemplate/SubDiagrams.xml) (Class/SubDiagrams.xml refer to Subtemplate/SubDiagrams.xml)

  • used to iterative the subDiagram of the model.
    @diagramType [ClassDiagram, UseCaseDiagram, etc…], represents which diagramType will be iterated, if no @diagramType, all diagram types will be iterated

ForEach: (refer: …/Report/Default/Class/TemplateParameters.xml)

  • used to iterative the “values” of a property of the Model. Always used with HasMetaModelPropertyChecker (if HasMetaModelPropertyChecker return ture, then iterate its values)
    @property [templateParametes (Class’s templateParameter), deferrableTriggers (State’s deferrableTrigger)]: represents iterate which property of the model.

IteractionBlock: (refer: …/Report/Default/Class/Attributes.xml)

  • used to iterative the “children” of the Model. Always used with HasChildElementChecker (if HasChildElementChecker return ture, then iterate its children)
    @elementType [Attribute, Operation (Class’s child), DBColumn (DBTable’s column)]: represents iterate which type of the children. (if no @elementType, all types will be iterated.

What are differences between and ?
If you want to check is the property’s value equal to its default value, then you can use DefaultConditionChecker.
If you wanna check is the property’ value equals/greater than/less than a specified value, then you can ValueConditionChecker

@property [visibility, etc…], the property you are looking for
@equalFlag [true/false], if “false”, it will be generated if the property’s value is NOT EQUAL to default value.
@propertyType (deprecated)

@property (same as DefaultConditionChecker)
@propertyType [string/int/boolean], the value should be in type “string”, “int”, “boolean”? (e.g. attribute’s visibility is “string (private/protected/etc…)”, DBColumn’s length is “int”)
@value, the value specified in this checker
@operator [EQUAL/NOT EQUAL/LIKE], check does the property value equals/not equals/like the value specified in this checker
e.g. check is the Attribute’s type equals “String” then

What is purpose of ?
refer to Question 2 ForEachRelationshipEnd, and …/Report/Default/Class/Associations.xml, and a.png
on line 8, <ForEachRelationshipEnd endPointer=“self” …>, it iterates AssociationEnd “a1”, “a2”
on line 10, , it get the EndRelationship from the RelationshipEnd (get “association 1” from “a1”, “association 2” from a2"),
that means, on line 8, 9, the model is AssociationEnd, but after line 10, the model is Association.
then on line 24, , it get the AssociationEnd from Association again. (model become “a1” for “association 1”, become “c” for “association 2”)
then on line 86, , it get the AssociationEnd from Association again. (model become “b” for “association 1”, become “a2” for “association 2”)
that means the Associations.xml will generate all Associations withs all theirs AssociationEnds to report.

How does works? Does it check if current object has at least one attribute? What is flag?
refer to Question 2, ForEach
@flag=“true” means if have Attribute, then the following xmlNodes will be executed
@flag=“false” mean if have NO Attribute, then the following xmlNodes will be executed

Is it similar for ?
Yes, you are correct.

Is there any way to find out parent of current object?
Yes, by .

What is purpose for ?
change the current model to the property’s value (if the property’s value is a Model)
PS: Class’s property “taggedValues”, it value is a model called TaggedValueContainer, not collection of TaggedValue.
so, if want to get TaggedValue(s) from Class, need get the TaggedValueContainer first, then get the children of TaggedValueContainer for TaggedValue.

I hope these will help. I’m looking forward to your response towards my question.

Best regards,
Lilian Wong


Hi Lilian!

First of all - thank you a lot for your quick and so detailed response! This is what I was looking for! :slight_smile:

I created template for Class Diagram. It is attached.
Idea about sorting is:

Package 1:
Class A1 (in package 1)
Class A2

Class Ax
Package 2:
Class b1

Class bx

Package LastOne:
Class z1

Classes not contained in Packages
Class 1

Class 9

I hope, that you understood my idea? I think I will be able to create such template by using :slight_smile:


Hi Ingus,

Thanks for your reply. I’ve passed your idea about sorting to our engineers to follow-up, I’ll let you know if I get any feedback about this issue.

Best regards,
Lilian Wong

Hi Ingus,

For the sorting classes issue, we enhanced to support it already. You can download the patch as well as the templates for sorting from the links below. Please place the templates into VPSuite/resources/Report/Default/ClassDiargam folder.

The templates will generate the classes on the class diagram with sorting by name/type/level (ascending/descending).



If there is any further inquiry, please do not hesitate to ask.

Best regards,
Lilian Wong

Hi Lilian!

Thank you (and all the team) for so quick response! Thank you a lot!

I tested the patch. I found out, that name sorting is done by Original name. I think that better could be that sorting is done by current Nickname - name that is displayed.

I still have difficulty with grouping Class diagram into 2 levels (Package and its Classes). I try to use . It works for classes that are contained in package. But for Classes that are not contained in any package it fails/stops. I think I need to check before that parent exists before use - something like . Is there something like this?

Hi Ingus,

Thanks for replying. I’ve passed the issues to our engineers to follow-up, and I’ll keep you informed for any feedback regarding to these issues.

Best regards,
Lilian Wong

Hi Ingus,

I would like to let you know that we changed to sort the classes by Nickname. And for your question of , we added @flag=[true|false], you can refer to the attached template.

You can download the latest patch and the template for sorting by Nickname from the following link:

If there is any further inquiry, please feel free to contact me again.

Best regards,
Lilian Wong

Hi Lilian!

Thank you for so fast response! Now I can get reports built the way I need :slight_smile:

Have a nice weekend! :wink:

Best regards,

Hi Ingus,

You are welcome. Have a great weekend! : ]

Best regards,
Lilian Wong

Hello, I am trying to change some of the xml too.
For example I changed the headertext and header styling (header 2 (vp) to header 3 (vp)) of a ‘Documentation’ element of an Usecase.
But somehow it keeps on showing the old header text. Nothing changed.

How is this possible. I restarted the Reportwriter several times.


I use the SDE version.
Path where I found the xml: …\VP Suite 3.3\resources\Report\Default

Dear Chrisism,

Would you mind send me your template file to have a look? If you don’t want to post it here, you can send it to Thanks!

Best regards,

As requested, I emailed it/
But here it is again:

<?xml version="1.0" encoding="UTF-8"?>
	<StaticText content="Omschrijving van usecase" style="Heading 3 (VP)"/>
	<!-- documentation -->
	<TableBlock colWidths="5000,5000" tableWidth="14500" alignment="right">
			<TableCell leftBorderEnable="false" rightBorderEnable="false" topBorderEnable="false" bottomBorderEnable="false">
				<StringPropertyText propertyText="documentation" style="Table Contents"/>

	<StaticText content="" style="Default"/>

As you can see, I only changed StaticText element.
But somehow my changes don’t show in the Report writer.

Furthermore, is it also possible to add own document templates to base the report on?

Got it myself…

Since I use the SDE version, you need another path.

VP Suite 3.3\visualstudio_2008\sde\Report\Default
instead of
\VP Suite 3.3\resources\Report\Default

It works now!!

Hi Chrisism,

Thanks for replying and I’m glad that your problem is solved. If there is anything we can do to help, please feel free to ask.

Best regards,
Lilian Wong