Author Topic: Customizing Report Template to show documentation content  (Read 2695 times)

Marcelino Placeres

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Customizing Report Template to show documentation content
« on: February 09, 2017, 04:17:05 am »
We need to be able to output a documentation content in a very specific order in a Model Report. I read the info related to the topic in the Sparx Website & watched all the tutorials that show how to customize Report Templates. We 've tasked to output a report following the order below:

1. Project Overview (Content in a RTF Document created in Sparx)
1.1 Project Summary(Content in a RTF Document created in Sparx)
2. Package Summary
2.1 Purpose
2.2 Content
3. Use Case
3.1 Use Case Diagram
3.2 Use Case Brief
3.3 User Stories & Acceptance Criteria
3.4 Actor
4.
4.1
5.
6. Design Requirements (Content in a RTF Document created in Sparx)

The items 1, 1.1, & 6 are in different RTF documents created in Sparx. They are within the top package. I can generate the Model Report with all the remaining items without a hitch. But, the RTF documents appear at the end of the report. We need the RTF documents to appear in the order requested by the clients. How I can achieve that? Any idea?

Thank you all in advance,

M



Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 589
  • Karma: +7/-0
    • View Profile
Re: Customizing Report Template to show documentation content
« Reply #1 on: February 09, 2017, 03:40:39 pm »
Have you looked at using a Virtual Document - see:
http://sparxsystems.com/enterprise_architect_user_guide/13.0/model_publishing/virtualdocuments.html
From the summary above this looks like what you need to use.

Marcelino Placeres

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Customizing Report Template to show documentation content
« Reply #2 on: February 10, 2017, 01:13:45 am »
Yes, indeed. I checked all the available documentation. In addition, I watched all the tutorials about Generating Reports. But, I haven't be able to get the output with the linked document in the position that I need. The documents appear at the end of the generated report. Regardless. That's why I'm asking for any advise. Maybe somebody has managed to do it.

Nabil

  • EA User
  • **
  • Posts: 138
  • Karma: +5/-2
  • Customizing EA for you
    • View Profile
    • View My LinkedIn Profile Here
Re: Customizing Report Template to show documentation content
« Reply #3 on: February 10, 2017, 05:42:22 pm »
Hi Marcelino,

Correct me If I'm wrong. What I understood from your question is you need to rearrange the section 6 to top and to make it section 1.2/ Section 2?

Best Regards
Nabil

Sparx Systems India - Services
Ultimate Guide EA14 | Consulting | Training Plans

Marcelino Placeres

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Customizing Report Template to show documentation content
« Reply #4 on: February 11, 2017, 04:18:16 am »
That's correct!!


Nabil

  • EA User
  • **
  • Posts: 138
  • Karma: +5/-2
  • Customizing EA for you
    • View Profile
    • View My LinkedIn Profile Here
Re: Customizing Report Template to show documentation content
« Reply #5 on: February 13, 2017, 05:13:14 pm »
Hi Marcelino,
You can use Master & Model templates concept to acheive this.

BR,
Nabil Saleem

Sparx Systems India - Services
Ultimate Guide EA14 | Consulting | Training Plans

Marcelino Placeres

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Customizing Report Template to show documentation content
« Reply #6 on: February 14, 2017, 04:27:11 am »
I tried both and I couldn't get what I need as output. I'm re-doing it again to see if I missed some step.

Thank you all for your help,

Marcelino

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8601
  • Karma: +210/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Customizing Report Template to show documentation content
« Reply #7 on: February 15, 2017, 11:06:47 pm »
The trick with virtual documents is that they print in the order they appear in the project browser.
So you'll have to modify the project browser order to change the order in your document.

The easiest way to make that work is to use small templates and use those for a single element.
So the template to get the linked document is nothing more then

package >
element >
linked document >
< linked document
< element
< package


In your model document you can then use the tagged values to indicate a search and the GUID of the element you are looking for.
the search we are using is called ZDG_ElementByGUID and has following code.

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

This makes it easy to construct your document based small templates that work on individual elements.

Geert

Marcelino Placeres

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Customizing Report Template to show documentation content
« Reply #8 on: February 21, 2017, 04:40:21 am »
      First all, I want to thank you all for your help. It means a lot to me.

      I have been "trying" different" paths. Nothing has worked so far.

      Geert:

      The ZDG_ElementByGUID should appear in the TaggedValues--> SearchName---"
ZDG_ElementByGUID "? Right? If that is the case, I can't find this TaggedValue.
  • The code that you provided has to be input in the Small template (Query Tab)?

Last question:
I have been given the task of creating a Document Template that should allow the Business Analysts (BAs) to generate a Requirements Package Document that satisfies the specifics IT's reporting requirements. When I tried to enable the sections  that I need, in the order that it is wanted, the section that I just enable "appears" in another order. Most of the times, "jumps' right up to the top of the others already enabled. Here are the questions:

  • Can we change the order in which the sections appear in the Section window?

  • Do they need to be selected in the same order that in the Section Windows?

  • Can we change the order in the Document Template using Templates Fragments?



Again, I thank you all for your help.

Marcelino
[/list][/list]
« Last Edit: February 21, 2017, 05:32:45 am by Marcelino Placeres »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8601
  • Karma: +210/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Customizing Report Template to show documentation content
« Reply #9 on: February 22, 2017, 04:32:18 pm »
Marcellino,

If you create a «model document» element then the tagged values for searchname, template and search value will be there.

The SQL code goes into an SQL search, not in a template.

Check out https://bellekens.com/2015/11/12/tutorial-generate-complex-documents-from-enterprise-architect-with-a-two-step-semi-automated-approach/ for an example model and some explanation.

Geert