Modify the Group By Fields
- Double click on the dataset for the group by fields.
- Change the Query type from Stored Procedure to Text.
Your query will begin with this:
SELECT ColumnName, ColumnLabel
FROM GroupOrderAssistantView
WHERE IsGroupBy = 'Y' AND SearchTableName = 'YOURTABLEHERE'
ORDER BY ColumnLabel
Replace YOURTABLEHERE with the name of the type of report you are running. You can find the value by running:
SELECT * FROM GroupOrderAssistantView
To add a custom field, use a UNION:
SELECT ColumnName, ColumnLabel
FROM GroupOrderAssistantView
WHERE IsGroupBy = 'Y' AND SearchTableName = 'Transactions'
UNION
SELECT 'Category', 'Matter Category'
ORDER BY ColumnLabel
Here, 'Category' is the database field name and 'Matter Category' is the label shown to the user.
Modify the Fields Dataset
Make sure your group-by field also exists in your main dataset. For a Transactions report, switch the dataset to "Text" mode and add the required field with a LEFT OUTER JOIN. Save and deploy the report — your new field will appear in the Group By dropdown.
