In VSM open Settings-> Invoices. Then click "Edit Templates" button. A menu with options will appear. From this menu select "Detailed billing" or "Summary billing". It will open the "Report Designer" window. Click the position "Detail", then a small button with a ">" is displayed. Click it. A menu will appear. Click the "..." button from the position "Sort Fields". "GroupField Collection Edition" window will be opened. To set any sort click the "Add" button. The "GroupField" will appear on left side and "Misc" on the right. Click the position "FieldName" and select Field to sort by it. You can change the sort order in the position "SortOrder".
You can add more than one Group Field. When finished click OK. To save changes click menu File-->save and close the window.