Skelta Workflow.NET 2004 Help
Adding 'Groupbys' in Output fields

The ReportXml.xml file groups the output fields that will be used to identify the database fields on which the search has to be performed. Nested groups are identified as tree structured levels for display. Each group has a unique 'groupby' name. The default 'groupbys' for the top level is 'Workflow'. The 'groupby' for the next level is 'Action', and for the innermost level it is 'Resource'. The name provided for a column is mapped with the queryfield element in queryfields tag to identify on which field the search has to be done. The queryfield will refer to the groupby name for this. If necessary you can add 'groupbys' of your own to suit the needs of your application.

To add new 'Groupbys'

1.  In the ReportXML.xml file, go to the innermost <groupby> tag. After the 'breakon' field name for this add the new groupby using the 'name' attribute.

2.  Specify the <column> tag with the column width. Specify the output fields as the column names using the <column> tag. Use the 'name' attribute to specify the name.

3.  The 'type' attribute is used to identify how to display or retrieve the value (for example if the 'type' is resource then the virtualid has to be passed and the name has to be retrieved from the resource collection).

4.  Build the query in the 'query' attribute. The search will be performed on this value.

5.  Specify the query field name in the 'queryas' attribute. If the 'queryas' attribute is null then that particular field is not included in the query.

6.  Specify the value to be displayed to the user as the output in the 'displayas' attribute. If the 'displayas' attribute is null then that particular field is not displayed in the output.

7.  Indicate if the field has to be displayed in the user interface by setting the value of the 'display' attribute to "True" or "False".

8.  Specify the width of the column in the 'displaywidth' attribute.

9.  If the search query cannot be built on a particular database field then you need to add a subquery. Add the 'conditionbuilder' element with "subquery" as its value.

10. Add the subquery and give it a name using the 'name' attribute. Set the 'value' attribute and the 'operator' attribute to appropriate values. Add the query element with the name "filtercondition". Add the 'type' attribute with value "subquery".

Note The queryname of a subquery will always be "filtercondition".

11. Now add the query using the <add> element with the 'add' and 'position' attributes.

Note The positions that can be provided are "fields" or "end".

12. Repeat steps 3 to 8 to add as many columns as necessary. Repeat steps 9, 10 & 11 if subqueries need to be added.

13. Close all open tags i.e. </query>, </subquery>, </column>, </columns> and </groupby>

The new 'groupby' is now added for the output fields.