Book a Demo

Author Topic: Relationship Matrix in Report Generator  (Read 9733 times)

Charles England

  • EA User
  • **
  • Posts: 27
  • Karma: +1/-0
    • View Profile
Relationship Matrix in Report Generator
« on: October 28, 2021, 05:58:30 pm »
I've got a relationsjip matrix generating in a Word document using the Matrix.Image field in the report template. However, the matrix is over 150 rows and it scales to a single page, so it's unreadable.
Can I split it over several pages by scaling it to be one page wide?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Relationship Matrix in Report Generator
« Reply #1 on: October 28, 2021, 06:09:38 pm »
I've got a relationsjip matrix generating in a Word document using the Matrix.Image field in the report template. However, the matrix is over 150 rows and it scales to a single page, so it's unreadable.
Can I split it over several pages by scaling it to be one page wide?
Not really I'm afraid.
I usually use an SQL fragment to retrieve the matrix data in tabular format.
It shows the same data, but not in a matrix format.

Geert

Charles England

  • EA User
  • **
  • Posts: 27
  • Karma: +1/-0
    • View Profile
Re: Relationship Matrix in Report Generator
« Reply #2 on: October 28, 2021, 07:28:03 pm »
Thanks Geert,
I guessed that would be the answer.
I don't suppose you have any pointers on the SQL to reterieve the data :)
 

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Relationship Matrix in Report Generator
« Reply #3 on: October 28, 2021, 08:00:51 pm »
Here's an example of a RASCI matrix between BPMN activities and PartnerRoles

Code: [Select]
select bpa.name as Activity,
r.RoleName, r.RASCI
, CASE WHEN r.RASCI = 'R' THEN r.RASCI ELSE NULL END as R
, CASE WHEN r.RASCI = 'A' THEN r.RASCI ELSE NULL END as A
, CASE WHEN r.RASCI = 'S' THEN r.RASCI ELSE NULL END as S
, CASE WHEN r.RASCI = 'C' THEN r.RASCI ELSE NULL END as C
, CASE WHEN r.RASCI = 'I' THEN r.RASCI ELSE NULL END as I
from t_object bp
left join t_object pl on pl.ParentID = bp.Object_ID
and pl.Stereotype = 'Pool'
left join t_object ln on ln.ParentID in (pl.Object_ID, bp.Object_ID)
and ln.Stereotype = 'Lane'
inner join t_object bpa on bpa.ParentID in (ln.Object_ID, pl.Object_ID, bp.Object_ID)
and bpa.Stereotype = 'Activity'
left join t_objectproperties tv on tv.Object_ID = bpa.Object_ID
and tv.Property = 'calledActivityRef'
left join t_object ca on ca.ea_guid = tv.Value
left join
(select c.Start_Object_ID, ro.Name as RoleName, tv.VALUE as RASCI from t_connector c
inner join t_object ro on ro.Object_ID = c.End_Object_ID
and ro.Stereotype = 'PartnerRole'
left join t_connectortag tv on tv.ElementID = c.Connector_ID
and tv.Property = 'RA(S)CI'
where c.Stereotype = 'trace') r on r.Start_Object_ID = bpa.Object_ID
left join t_diagramobjects do on do.Object_ID = bpa.Object_ID
left join t_diagram d on d.Diagram_ID = do.Diagram_ID
and d.ParentID = bp.Object_ID
where bp.Object_ID = #OBJECTID#
order by do.RectLeft, do.RectTop desc, bpa.Name
, CASE WHEN r.RASCI = 'R' THEN 1
WHEN r.RASCI = 'A' THEN 2
WHEN r.RASCI = 'S' THEN 3
WHEN r.RASCI = 'C' THEN 4
WHEN r.RASCI = 'I' THEN 5 END

Geert

Charles England

  • EA User
  • **
  • Posts: 27
  • Karma: +1/-0
    • View Profile
Re: Relationship Matrix in Report Generator
« Reply #4 on: October 28, 2021, 08:23:22 pm »
Thank you Geert, that should get me going. I appreciate it.