...
You can retrieve other diagram table types by using the complete code shown below for getting values from the Generic Table:
Image Added
The complete code for getting values from the Generic Table.
| Code Block |
|---|
|
#import('generic', 'com.nomagic.reportwizard.tools.GenericTableTool')
#foreach($diagram in $Diagram)
#if($diagram.diagramType == "Generic Table")
#set($table = $generic.getTable($diagram))
$diagram.name
<table>
<colgroup>
<col/>
</colgroup>
<tbody>
<tr>
<td colspan="1">
<pre>#forcol($id in $table.getVisibleColumnIds())$table.getColumn($id)#endcol
#forrow($row in $table.getRows())
#forcol($id in $table.getVisibleColumnIds())
$table.getValueAsString($row, $id)
#endcol#endrow </pre>
</td>
</tr>
</tbody>
</table>
#end
#end | Note |
|---|
|
You can customize line of code, e.g., by adding diagram table types to get the Metric Table or Instance Table, as shown below: | Code Block |
|---|
| #if($diagram.diagramType == “Metric Table” || $diagram.diagramType == “Instance Table”) |
|
...