If you want to use a context that you have created, you must define what information to display for the data in the context's groups (and possibly include how you want to traverse the context). If you do not define how you want to use a context, nothing will display. This article describes the basics of how, using a context's group(s), you define what data to display/output.


Prerequisites


ForEachInContext

The <ForEachInContext> tag is used to define what information to "print". It has three attributes: 

  • name is the name attribute of the <Context> to be used. This is required and the values must match exactly.
  • group is the defobj attribute of the group defined in the context that you want to start from. This is required and the values must match exactly.
  • sort can be used to define a specific sort. The value can be any Field Code (See Field Codes in the application Help for details). Optional.


Example

<Report>
  <Context name="architectureTop">
    <AddParts owner="main" sid="3EFL" part="archToE2EList" defobj="E2EList"/>
    <AddParts owner="E2EList" sid="3PEN" part="E2EListToE2E" defobj="E2Es"/>
  </Context>
  <ForEachInContext name="architectureTop" group="E2Es">
    <Text>#{Name}</Text>
  </ForEachInContext>
</Report>


<ForEachInContext name="architectureTop" group="E2Es">




The resulting report would look like this:



What's Next?

Learn how to traverse forward and back in a given context.