Displaying referenced diagrams underneath steps

Starting in version 2012 R2, you can create a custom Word report to show diagrams referenced by steps and extensions directly underneath each step, instead of in a separate section beneath the flow of events. This article explains how to customize a report to do this.

In case you're not familiar with diagram references, here's a quick overview. You create one by right clicking in any text and selecting Insert Diagram Reference, or pressing Ctrl+D.  This pops up a list of diagrams to choose from. After selecting a diagram, a hyperlink is added to your text. For example, you might end up with a step that looks like this:

8. System presents payment confirmation. DGM-Payment Confirmation Wireframe.ndx 

Now let's look at the report customizations needed to show the wireframe immediately underneath the step in the generated report. If you look at the standard use case report template, you'll see that steps and extensions are shown using a $list command:

1.  $listSteps $Description

To show diagrams associated with each step, you'll need to use $repeatSteps instead of $listSteps. This allows you to report diagrams in the context of the step. The downside of using $repeat is that you lose auto-indenting and auto-numbering that happens automatically when you use $list. To compensate for this, use $indent to instruct CaseComplete to apply indenting that corresponds to the nesting-level of the current step. And instead of using auto-numbering provided by Word, use the $OutlineNumber keyword.  Here’s an example of the changes required:

$indent $OutlineNumber $Description

$indent $FileName:
$indent $Picture


This will show the diagram(s) that are referenced in the step (if any) underneath the text of each step.  This feature does not support showing diagrams inline with the text of the step itself.  Notice that this example also displays the file name of the diagram. In fact, you could add any keywords supported in the context of a diagram, such as its $Description.

Sample Report Templates

See the attached sample reports for real world examples.  The first report, DiagramsPerStep, demonstrates two slightly different techniques for showing diagrams. In the steps section, it uses a $repeat to show the diagrams as well as the file name (as above). In the extensions section, it uses a $list to show just the diagram.

The second report is a test cases report that demonstrates how to show diagrams that are referenced by testing procedures and expected results. In addition, it shows how you can list diagrams next to the step instead of underneath it, by use of a table. It uses two new keywords, $listProcedureDiagrams and $listExpectedResultsDiagrams to pull in the appropriate referenced diagrams. The report is very similar to the built-in test cases report but a key difference that you should be aware of is that the table cells were changed to be fixed width so that the diagrams will be resized to fit within the cell (right click in table, select AutoFit / Fixed Column Width)

Have more questions? Submit a request
Was this article helpful?
0 out of 0 found this helpful


Powered by Zendesk