Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: jplusip on July 29, 2015, 12:38:23 am
-
What I would like to do:
Run a report on the Root package that goes through the entire model and generates a report, where different packages have different reports.
I guess the best way to describe it is that it would be like a Template Selector, only instead of looking at types/stereotypes, it would just look at PackageID and run a fragment on that package only.
Though now that I think about it, maybe applying different stereotypes to those packages would work. I guess I'll test that out, but if there's a better way I'm all ears!
Edit:
Stereotype idea didn't work (if anyone is wondering). The Selectors just ran the fragments on the packages and ignored the elements within them.
So... back to square one: how do I do this in the tool?
-
Hi,
Yes you could create multiple document fragments, each with its own custom SQL that retrieves rows for packages with a specific stereotype. Although I'm not sure if you can pass #PACKAGEID# to a fragements SQL, I think you can only pass #OBJECTID# - so it may not work.
Perhaps a better solution would be to create multiple ModelDocuments, that either explicitly includes specific packages, or has a filter for a specific package stereotype. Then add the ModelDocuments to a MasterDocument.
Regards,
Jon.
-
So, when you talk about the ModelDocuments, are you suggesting having a different template pending on the package I want to report on, and then merging all of those generated documents into a master document?
If so, that's actually what I'm doing right now. :) I'm just trying to see if there's a way to make things slightly more efficient to where I can just run one report off of the root package. Also, using this approach I'm having to structure the model around how I want to report on it, so I'm also trying to see whether or not that is necessary.