May I get some assistance on this issue?
A colleague modified the Trial Balance Detail report to add a Cost Center header and footer. Their break field definition is the same for both. It has been so long since I worked with these sections that I don't remember if this definition means both Account Number and Account Number:Account_Segment_Pool2 are break fields or since the latter is highlighted when I open the window that means only it is considered the break field.
They also created a Sort Definition that includes both these fields from the reports temp table.
The issue is that the report prints fine when selecting the Cost Center as the sort in the Sort By: Segment ID option on the Trail Balance Report Options window, but it gives the bad break field error if you select any other segment here.
UPDATE :
My current hypothesis is the problem cannot be resolved due to it being a fundamental conflict with the Break Fields in the Cost Center header and footer and the attempt to sort the report differently than the defined Sort Definition as these alternate sorts do not contain the Break field.
From Dexterity Help: Sorting criteria specified at runtime supersede the sorting criteria defined in the report definition.
A Sort Definition was created on the report of Account Number and Account Number:Account_Segment_Pool2. The Break field chosen for the new sections is Account Number:Account_Segment_Pool2. Now we come into the Trial Balance Report Options window which allows you to choose a segment to sort by and the code called from this window is this :
sort by
component 'Segment Sort By' of table GL_Options_TEMP of field 'Account Number' of table GL_Trial_Balance_TEMP,
'Account Number' of table GL_Trial_Balance_TEMP,
I think this works when the Segment chosen is the Cost Center segment because the line starting with "component" will be the same as Account Number:Account_Segment_Pool2, but it will fail when choosing a different option. Consider this line from Dexterity Help as well:
The fields available for additional headers and footers to break on in the Header/Footer Options window are drawn from the main table's key or the sorting method, if one exists. If you create a sorting method or change the key used by the report, you could inadvertently exclude an additional section. If you're using additional headers and footers on your report, we recommend that you use caution if you use a different key or create a sorting method.