Use the GenerateGraph tag to generate and include a graph in a report. The content should include a graph-defining XML using the SystemWeaver script language. This tag is, in essence, equivalent to the graphs generated using the Configurable Graphs view. For example, the content of a <Graphs> tag in the Configurable Graphs view can be used in a <GenerateGraph> tag in a report by simply replacing the <Graphs> tags with <GenerateGraph> tags.


Example XML

<Report>
 <Text>#{Name}</Text>     
 <Text>#{Version}</Text>
    <GenerateGraph>
        <NodeStyles>
            <NodeStyle name="Document" borderThickness="2" fillColor="#FFFFFF"/>
            <NodeStyle name="Section" borderThickness="2" fillColor="#FFFFFF" fillColor2="#F0F0F0"/>
        </NodeStyles>
        <Node style="Document">
            <ForEachPart type="ITAP">
                <Node style="Section">
                    <DefObj>
                        <ApplyItemTemplates/>
                    </DefObj>
                </Node>
            </ForEachPart>
        </Node>
    </GenerateGraph>
  <ItemTemplate type="ITFD">
    <ForEachPart type="ITAP">
      <DefObj>
        <Node style="Section">
          <ApplyItemTemplates/>
        </Node>
      </DefObj>
    </ForEachPart>  
  </ItemTemplate>
</Report>


Result

The graph content is generated and included in the report.


When including a graph in a report, you may need to restructure the Graph's XML definition by moving some tags (e.g., <Parameters>, <Template>,<Function>, outside of the <GenerateGraph> element, e.g., place them before  <GenerateGraph>.


Example