I am building a custom report where I’m being asked to collect and report on two pieces of data:
- Count of Occurrences: This comes from selecting an object in a model and viewing Properties > Occurrences. They want however many occurrences exist per object to be reported by a number (see table for example).
Question: I cannot find in the ARIS wizard where to do this. If you do a Semantic Check Report, the statistics portion counts up instances, so I'm thinking this should be fairly easy, but don't know how to do it. I’m pretty certain it can be added to the report code using JavaScript, but not sure how to proceed with that. Is this possible? Do you, can you, provide me with instructions on how to do it or with the code snippet to put in my custom report?
- Subordinate Assignments: This comes from Properties > Assignments. The same issue as just mentioned for Count of Occurrences applies here as well. Can you help me resolve this as well?
Here’s the snippet of the ARIS report I’m constructing if it helps you see what I’m trying to do:
Thanks for any help given.
There are couple of approaches for the occurrence counts
1) If you're comfortable with coding in JavaScript you could edit the code generated by the Report Writer. The code is fairly easy to interpret. Find the part of the code that is writing the nformation to the cells. Once you locate that section, add method call to determine the occurrence count. The method call is <ObjDef>.OccList().length. This will return the number of occurrence objects for the Definition Object <ObjDef>.
One thing to note...if you manually edit the code created by the Report Writer, it will not be able to be modified by the Report Writer. You are then committed to maintaining the JavaScript code itself.
We've used this approach and it works but again you need to be comfortable with JavaScript coding.
2) If you do not want to work with JavaScript, use the Report Writer to produce an Excel workbook that lists the occurences of an object. Then use Excel's Pivot Table function to create the counts. It looks like you already have the majority of the Report Write definition for the report. Don't worry about the counts, just list the occurrences.
There are two drawbacks to this approach. One is the extra step of creating the pivot table. The other one is if the number of rows created by the report exceeds 64K, then it will break Excel. AFAIK, the current release of ARIS 7.x does not support Excel 2007 worksheets that can contain up to 1million rows.
Jim
Thanks, Jim, for your response. I'm not comfortable with JavaScript so I'm looking for an alternate. Your item 2 sounds intriguing, but with the drawbacks you mention, I don't believe it's an ideal solution.
We may need to hire someone to finish this report for us unless someone has the JavaScript code that they can share with me. I can drop it into the code, just not knowledgeable in JavaScript coding.