Skip to content

Custom Groups in ProLaw Reports

Modify the Group By Fields

  • Double click on the dataset for the group by fields.
  • Change the Query type from Stored Procedure to Text.
ProLaw Reports Custom Groups
ProLaw Reports Custom Groups

Your query will begin with this:

SELECT ColumnName, ColumnLabel

FROM GroupOrderAssistantView

WHERE IsGroupBy = ‘Y’ AND SearchTableName = ‘YOURTABLEHERE’

ORDER BY ColumnLabel

You will need to change ‘YOURTABLEHERE’ to the name of the type of report you are running.

You can find the value for ‘YOURTABLEHERE’ by running this query in SQL & locating the type of report you are running in the “TableName” column:

SELECT * FROM GroupOrderAssistantView

For this example, we have used Transactions.

SELECT ColumnName, ColumnLabel

FROM GroupOrderAssistantView

WHERE IsGroupBy = ‘Y’ AND SearchTableName = ‘Transactions’

ORDER BY ColumnLabel

Once you have that set, you will need to use a UNION in your SELECT statement to pull in the field you would like added.  The first value should be the database field name you are referring to, the second should be the label you want to show the user.

SELECT ColumnName, ColumnLabel

FROM GroupOrderAssistantView

WHERE IsGroupBy = ‘Y’ AND SearchTableName = ‘Transactions’

UNION

SELECT ‘Category’, ‘Matter Category’

ORDER BY ColumnLabel

So, in this example ‘Category’ is the field name in our new table. ‘Matter Category’ is the label that will show in the Group By drop down list.

ProLaw Reports Custom Groups
ProLaw Reports Custom Groups

Modify the fields dataset

It is necessary to have your group by field in your main dataset – remember the field name must match the first value in the new SELECT you added to your Group By dataset.

In this example we are in a Transactions report, so first I change the Transactions dataset to “Text” and use the default dataset SQL as a starting point.

ProLaw Reports Custom Groups
ProLaw Reports Custom Groups

If the fields you are adding to the Group By do not exist, add them to your dataset.  For Transactions we need to add the MatterCategories.Category field and then link it in the “WHERE” clause with a LEFT OUTER JOIN:

Save and deploy the report and you will now see your field in the Group By drop down list.

ProLaw Report Building Tips

#ProLaw #ProLawReports #Custom #Group #CustomGroups

Back To Top