If a template is created with select criteria for the AR Statement Report, the Report is not sorted correctly when the template is loaded.
This has been reported as Bug #24133
The workaround for this bug is as follows:
Input the information in the Select tab.
Before you save the template with the select information click the Sort tab.
Delete whatever is in the Sort tab.
When the Sort tab is cleared, save the template.
Load the newly saved template and print the report, the report will be sorted correctly.