Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: MichaelJ on July 07, 2020, 12:38:48 am

Title: Reporting - Reference Document Artefact
Post by: MichaelJ on July 07, 2020, 12:38:48 am
Hi everyone,

We have attempted to reference document artefact content (not templated, just plain RTF content like "Project Summary") with no luck. A few cases we've investigated include:


A few observations:
We would like to generate different documents, each that contains the content found in the "Project Summary" and prefer to stay away from copy-pasting this content into each type of report.

Is there a way in Sparx EA to include document artefact content into a generated custom report AS-IS before any template content?
Title: Re: v15.2 Reporting - Reference Document Artefact
Post by: Geert Bellekens on July 14, 2020, 03:48:54 am
Yes that is possible.

What we do is create a document artifact for this type of info.
Then we use a virtual document for our document generation, and include a model document that references this document artifact using a search.
In the parameter we put the guid.

The search we use is a simple ElementByGUID search that returns the element with the guid in the search term:

Code: [Select]
select c.ea_guid AS CLASSGUID,c.object_type AS CLASSTYPE,c.name AS Name, c.stereotype AS Stereotype ,package.name AS PackageName ,package_p1.name AS PackageLevel1,package_p2.name AS PackageLevel2,package_p3.name AS PackageLevel3
from ((((t_object c
inner join t_package  package on c.package_id = package.package_id)
left join t_package  package_p1 on package_p1.package_id = package.parent_id)
left join t_package  package_p2 on package_p2.package_id = package_p1.parent_id)
left join t_package  package_p3 on package_p3.package_id = package_p2.parent_id)
where
c.ea_guid like '<Search Term>'

Geert
Title: Re: Reporting - Reference Document Artefact
Post by: MichaelJ on July 14, 2020, 08:05:05 am
Hi Geert,

Thank you for your repsonse, it's much appreciated and tremendously helpful.

We performed the following steps as described:


When generating the report for the virtual document, EA requires a template to be assigned to the document model. By default this is "Model Report" which means the generated report contains basic class details of the document model class element and thereafter the document artefact details. If we chose to NOT use a document template, EA still defaults to "Model Report".

I suppose resolving EA's need for a template could be resolved by creating a new template with *zero* section content specified?
Title: Re: v15.2 Reporting - Reference Document Artefact
Post by: Geert Bellekens on July 14, 2020, 01:53:01 pm
We use a a very simple template that only inlcudes

package>
element>
linked document>

Geert
Title: Re: Reporting - Reference Document Artefact
Post by: MichaelJ on July 14, 2020, 07:23:40 pm
Good to know that, thank you.