Display Classifier's Notes/Properties When Generating RTF in Sparx Enterprise Architect

StackOverflow https://stackoverflow.com/questions/23270314

  •  08-07-2023
  •  | 
  •  

Question

I'm using Sparx Enterprise Architect 10.

I have an instance of a Component on a diagram and I would like to display both:

  • the instance's notes; and
  • the classifier's notes

when generating RTF documentation.

If I have a package structure like this:

Package Structure

And have a template that publishes the Diagrams package and the elements on the package's diagram, I would like to get a result that looks like this:

RTF Output

It does not look like there is a field available for the classifier's notes -- only the name of the classifier. Do I have to do this with custom SQL?

EDIT - April 25:

Is anyone familiar with the SQL or script required to do this?

It looks like the only way to add a custom field to the report is using a fragment.

Was it helpful?

Solution

I've found that if I create a template fragment which displays the field that I want and use a custom query, I can get return the information that I want.

Create the Template Fragment

Create a template fragment in Enterprise Architect.

  • Only check the Custom checkbox in the Sections tree.
  • Right click between the custom start and end tags on the page and choose Insert Custom Field.
  • Type the name of the custom field (in this case, I chose to use Notes).
  • Save, the click the Document Options icon.

Template Designer

Set the Template Fragment Document Options

  • Specify the SQL search string on the Custom Query tab.
  • Note that the Note field must be aliased (as Notes)
  • Ensure that the Document Options tab has Template Fragment checked.

The SQL that was needed is:

select Note as Notes from t_object where object_id=(select classifier from t_object where t_object.object_id=#OBJECTID#)

The Custom Query tab should look like this:

Document Options Dialog

OTHER TIPS

Unfortunately, yes. You can go the other way and retrieve additional information from a classifier's instances, but not from an instance's classifier. The same is true in EA 11 (1105).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top