Book a Demo

Author Topic: Generating reports for nested elements  (Read 6380 times)

Hazzelbanger

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Generating reports for nested elements
« on: May 16, 2016, 10:47:18 am »
I am attempting to generate an RTF document that reports information for nested elements (Parent->Child-1->Child-1.1). However, I can only report info for Parent and Child-1, even though the RTF template has enabled "Package.Element.Child Elements" and "Package.Element.Embedded Elements". N.B. for testing I have used nested elements of type Class. However, my design model has nested elements of type Component, Port and Part.

My template spec is:

Code: [Select]
package>
child packages>
element>
{Element.Name}
<element
embedded elements>
      Embedded: {EmbeddedElement.Name}
<embedded elements
child elements>
      Child: {Element.Name}
<child elements
<child packages
<package

If I remove the line "Child: {Element.Name}" the nested elements appear in the report.

Is this a limitation with EA or do I need to change something for nested elements to use a different reporting format, eg template selectors or fragments?

EA Version: 11.0.1107
« Last Edit: May 16, 2016, 11:04:16 am by Hazzelbanger »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Generating reports for nested elements
« Reply #1 on: May 16, 2016, 11:59:47 am »
The problem is that there's no way to specify where inside a child element you want its children. If the child element section is empty then it uses the element section and inherits that position.

You can probably use fragments to achieve what you're after, but I'm not the best person to describe how that will work.

Hazzelbanger

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Generating reports for nested elements
« Reply #2 on: May 18, 2016, 01:54:06 pm »
I have solved my problem using a mixture of template selectors and template fragments.

cjcrystal

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Generating reports for nested elements
« Reply #3 on: January 31, 2018, 03:41:01 pm »
I have solved my problem using a mixture of template selectors and template fragments.

by any chance your Template Fragment used a dynamic input parameter

Nabil

  • EA User
  • **
  • Posts: 149
  • Karma: +5/-2
    • View Profile
    • View My LinkedIn Profile Here
Re: Generating reports for nested elements
« Reply #4 on: January 31, 2018, 04:23:30 pm »
You can acheive this using document script

I have an example model for how document script works in EA.
You can download it from this bit.ly/2DiBohE
Nabil