Author Topic: Nested elements dont show up in documentation  (Read 3714 times)

michielper

  • EA User
  • **
  • Posts: 105
  • Karma: +1/-0
    • View Profile
Nested elements dont show up in documentation
« on: September 09, 2016, 11:48:39 pm »
I have a nested structure in my Project Browser with various element types (actually Goals, Principles and Requirements in Archimate). Now I want to make a report where only one type of element is included, independent of its level in the Project Browser nesting.
So I checked the box  <Include child elements even if the parent element is filtered out>.
However, that seems to work only for the first level!! Not recursively..... Elements which are two levels deep and are children of elements that are not included in my filter, are not printed!!!! Very weird indeed.
So, what am I doing wrong?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9071
  • Karma: +235/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Nested elements dont show up in documentation
« Reply #1 on: September 09, 2016, 11:57:00 pm »
I think I've seen that behavior before too.

My solution back then was to use an SQL search as source of the model document (using virtual documents)

Geert

michielper

  • EA User
  • **
  • Posts: 105
  • Karma: +1/-0
    • View Profile
Re: Nested elements dont show up in documentation
« Reply #2 on: September 10, 2016, 12:17:35 am »
Ok, thanks, good to know Im not the only one..... The strange thing is that I am quite certain it has worked before.... Looks like a nasty bug.

How does an SQL query solve this and how do I set that up?

Michiel

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9071
  • Karma: +235/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Nested elements dont show up in documentation
« Reply #3 on: September 10, 2016, 01:53:20 am »
Hi Michiel,

Using Virtual Documents you can set an SQL Search and argument as the source of the document.
So if you create a search that returns all elements in a package (regardless of nesting) using the GUID of the package as search parameter then your document will contain the information for the whole set of elements.
See https://bellekens.com/2015/11/12/tutorial-generate-complex-documents-from-enterprise-architect-with-a-two-step-semi-automated-approach/ for an example

Geert

michielper

  • EA User
  • **
  • Posts: 105
  • Karma: +1/-0
    • View Profile
Re: Nested elements dont show up in documentation
« Reply #4 on: September 12, 2016, 05:31:53 pm »
Geert, thanks for this help, I will try and see if this solves my problem. However this is still a very serious error in the application I would say. It seriously hampers my work! How can we notify Sparx about this, or are they aware? And what is their response?

Michiel

michielper

  • EA User
  • **
  • Posts: 105
  • Karma: +1/-0
    • View Profile
Re: Nested elements dont show up in documentation
« Reply #5 on: September 12, 2016, 06:02:23 pm »
I have looked at your example Geert. Wow! It looks very complex and not for the faint hearted.....only to work around a stupid bug! Perhaps I could pull this off if I invest some time but I need to transfer my knowledge on the generation of these reports to others who are not deeply technical. Is there no simpler method?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9071
  • Karma: +235/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Nested elements dont show up in documentation
« Reply #6 on: September 12, 2016, 06:13:09 pm »
Michiel,

In order to notify Sparx of an issue you'll need to send in a bug report

My solution really isn't as complex at it looks at a first sight, and it does more then only work around this particular bug.
Using SQL searches gives you complete freedom in selecting which element you want to include in your document, regardless of the model structure.

Geert

michielper

  • EA User
  • **
  • Posts: 105
  • Karma: +1/-0
    • View Profile
Re: Nested elements dont show up in documentation
« Reply #7 on: September 12, 2016, 10:34:49 pm »
Ok, I was able to create a Search that returns the elements that I want (using an SQL query with #Branch#). So now I want my report to use this search as its input! From your reply I think this is possible and it seem perfectly reasonable. But I dont yet see how to do that, there is no <input> field in the report GUI  :(.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9071
  • Karma: +235/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Nested elements dont show up in documentation
« Reply #8 on: September 12, 2016, 11:36:36 pm »
You can't use #Branch# search query for a model document.

Geert

michielper

  • EA User
  • **
  • Posts: 105
  • Karma: +1/-0
    • View Profile
Re: Nested elements dont show up in documentation
« Reply #9 on: September 13, 2016, 05:19:49 pm »
Ok, but in general. Can I use a Search as the input for a report? If so, how?

Michiel

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9071
  • Karma: +235/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Nested elements dont show up in documentation
« Reply #10 on: September 13, 2016, 07:34:56 pm »
Yes, Check the tagged values of the model document.
There a dropdown to select the search, and another tag to enter the search value.

Geert

michielper

  • EA User
  • **
  • Posts: 105
  • Karma: +1/-0
    • View Profile
Re: Nested elements dont show up in documentation
« Reply #11 on: September 13, 2016, 10:55:02 pm »
... And a field to specify an RTF Template which also contains a selection query...that will often conflict with the Search. So which of the two works?

So far I have not been able to make this work.

BTW I have sent in a bug report to Sparx.
« Last Edit: September 13, 2016, 10:57:48 pm by michielper »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9071
  • Karma: +235/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Nested elements dont show up in documentation
« Reply #12 on: September 14, 2016, 01:56:09 am »
NoNo, you don't need to specify a query in the template, only in the model document.
Your template works like it would if you were to run on a package containing all elements returned by your query.

Geert

michielper

  • EA User
  • **
  • Posts: 105
  • Karma: +1/-0
    • View Profile
Re: Nested elements dont show up in documentation
« Reply #13 on: September 14, 2016, 03:27:55 am »
Well, I specified a Search that returns 4 elements and an RTF Template without any element filters. It is attached to the Model Document as Search Name. When I choose Generate Documentation on the Model Document, I get all elements, many more than the 4 that are returned by the Search. It looks like the Search is ignored.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9071
  • Karma: +235/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Nested elements dont show up in documentation
« Reply #14 on: September 14, 2016, 03:59:25 am »
Well, I specified a Search that returns 4 elements and an RTF Template without any element filters. It is attached to the Model Document as Search Name. When I choose Generate Documentation on the Model Document, I get all elements, many more than the 4 that are returned by the Search. It looks like the Search is ignored.
You must be doing something wrong then.

Have you tried the learning centre articles about virtual document?
There are at [Alt-F1] Then Enteprise Architect > Reporting > Virtual Documents

I have found them very useful in figuring out how it all worked.

Geert