Report | |||
Issue type | Estimated effort | Actual effort | Difference |
New feature | 15 | 6 | 9 |
Enhancement | 10 | 2 | 8 |
Bug | 8 | 2 | 6 |
Sum: | 33 | 10 | 23 |
Average: | 11 | 3,33 | 7,67 |
Reports are good not only for the client console user, but also for admin.
Alternative usage for reports
I made for me a report with all choicefields.Select: select c.id as cid, c.name cname, i.id iid, i.name as iname from choicefield c, issuefield i where i.id=c.issuefield order by 3,1
Template:
<html> <body> <table border=1> <thead> <tr> <td colspan="4" align="center" bgcolor="#C0C0C0"><b>Report</b></td> </tr> <tr> <td>Issue field ID</td><td>Issue field name</td><td>Choice field ID</td><td>Choice field Name</td></tr> </thead> <Datarecord> <tr> <td><Field Name="IID"/></td> <td><Field Name="INAME"/></td> <td><Field Name="CID"/></td> <td><Field Name="CNAME"/></td> </tr> </Datarecord> </table> </body> </html>
And I get this nice list, which helps me design the database.
Conditional output
It is possible to conditional report processing. Supported syntax:
<Condition [Template="Template"] SimpleCondition="FIELD_NAME=VALUE">some body</Condition>
%body in the template represents the tag body. If the condition is true the tag body will be used otherwise the template.
If you want to display ISSUETYPE=1 in bold, so you can use this snipet:
<Condition SimpleCondition="ISSUETYPE=1" Template="<b>%body</b>">
<Field Name="ISSUETYPE"/></Condition>
Master-detail
Why do you need it? I have one practical case. You want to print out your issues and all notes with them.
So what do you need for it.
1. The data: select i.id, i.name, n.text from issue i left outer join note n on n.issue=i.id order by i.id
2. A good template:
3. Some explanation:
<html>
<body>
<table border="1">
<datarecord>
<Condition NewMasterFields="1">
<tr>
<td><Field Name="ID" MasterField="1"/></td>
<td><Field Name="NAME" MasterField="1"/></td>
</tr>
</Condition>
<Condition SimpleCondition="TEXT=">
<tr>
<td><DetailIndex>/<DetailCount></td>
<td><Field Name="TEXT"/></td>
</tr>
</Condition>
</datarecord>
</table>
</body>
</html>
MasterField="1" marks the master datarecord fields
<Condition NewMasterFields="1"> is true in case of new master datarecord, which in turn means
this condition returns true wenn the concatation of all master field string representation changes.
In our example the join returns the issue name and id for each issue's note.
<Condition SimpleCondition="TEXT="> this prevents from generating of empty table line for issues withou note.
<DetailIndex>Iterates through a group
<DetailCount>Number of items in the group
Feel free to make reports with issues per user, module or whatever you need.
See also: