Book a Demo

Author Topic: How to make document table with element names in rows and attributes in columns  (Read 4487 times)

RayF

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
When making a report template the default is that each element and attribute are separate sections.  I have a variable group of elements that have a static set of 5 attributes.  I want a table to show the default values of the attributes but EA's reporting function always pushes the attributes into another row.  Can I use a template fragment to get the attribute data and put it in the next column?

steen.jensen

  • EA User
  • **
  • Posts: 181
  • Karma: +8/-1
    • View Profile
I did a report template with a table as this:
- Just insert a 1 row table and as many colums you need (Element name + attributes)
- Element name in 1:a cell, then a attribute/Tagged-value in each cell there after.

When open this report in word, just copy whole table and insert in excel, so easy that any user can do it.

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 344
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
You can use a document fragment template and based on your ability in SQL, do a query that returns the data in that way (row per element and column per attribute), then use the Custom check in the template editor to insert the data in your table.

I've done something like that with tag values. It is the same idea.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
The problem here is that you have a variable number of attributes, but a fixed number of columns.

But if you indeed always have 5 attributes, you can solve this using a SQL fragment by joining to t_attribute 5 times.

Geert

PS. Always having 5 attributes feels like you are using attributes the wrong way. Could it be these attributes really should be tagged values?

RayF

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
I can make them tagged values, and that works much better.  With the valueof() I'm able to put the specific tag in the proper cell/column. Thanks for the help.