Author Topic: RTF Reporting Questions  (Read 1134 times)

Dorian Workman

  • EA User
  • **
  • Posts: 194
  • Karma: +0/-0
    • View Profile
RTF Reporting Questions
« on: September 13, 2011, 05:11:38 am »
Apologies if this has been asked before, I searched but couldn't find an answer.

I have a single package with three class diagrams and a bunch of classes in it.

1. When I run an RTF report on this package, I would like only the classes on the diagrams to be included in the report.  Is there a way to tell the RTF generator to exclude elements not on the diagrams?

2. My current template spits out all three diagrams, then all the element documentation after that.  Can I tell the RTF generator to report on Diagram 1, then all the elements on that diagram, Diagram 2 and all its elements, etc?

Thanks.
<a href="http://www.linkedin.com/in/dorianworkman" ><img src="http://www.linkedin.com/img/webpromo/btn_liprofile_blue_80x15.gif" width="80" height="15" border="0" alt="View Dorian Workman

Michael Proske

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: RTF Reporting Questions
« Reply #1 on: September 17, 2011, 02:46:24 am »
Try to use diagram element section in the rtf template for reporting instead of the overall element section. Maybe this helps

Andy Peyton

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: RTF Reporting Questions
« Reply #2 on: September 19, 2011, 10:38:33 am »
I asked about this last week, having had the same issue.  As I was told, the diagram "is not a model" just a graphical view of anything in the model.  I was told to either:
  • create separate sub-packages and move the elements into the various sub-packages, or
  • to create a "model document" into which you copy everything that you want to report on.  I haven't yet had a chance to investigate this, but it seems that this is actually the best long-term strategy for producing outputs.
Hope this helps.



Fred Bevan

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: RTF Reporting Questions
« Reply #3 on: September 22, 2011, 10:48:52 pm »
You could do this by creating the report through scripting using the DocumentGenerator class. It is a bit of work but I create most of my reports that way because it is the only way to get the level of control that I need.

To get the elements on a diagram, use the DiagramObjects collection. This will give you the ElementIDs, which can be used to access the elements. This would also make it possible to report based on element type or other criteria.

philchudley

  • EA User
  • **
  • Posts: 544
  • Karma: +9/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Re: RTF Reporting Questions
« Reply #4 on: September 22, 2011, 11:58:24 pm »
You can achieve this with some limitations.

1) On the RTF documenation generation dialogue check the checkbox "Include all diagram elements in report"
2) In your template check the checkbox "Elements" (which is a child of the Diagram checkbox)
3) In your template uncheck the checkbox "Elements" (which iterates through the elements in the same package as the diagram)

Gotchas :
1) You only have access to basic information of the element, you will not be able to access any of its collections, for example the attributes or methods
2) You may have to set the document options to only output Classes (exclude details for), if you have other elements on your diagram other than classes

Cheers

Phil
follow me on Twitter

@SparxEAGuru