Основываясь на предложениях Михаила и Чака, я думаю, что лучшим способом для этого конкретного проекта будет создание содержимого .csv в глобальном поле, а затем экспорт содержимого поля.Основная схема того, что я делаю:
Go to the first record
Loop
WriteTheRows (see below), comma delimited, to a global field
Set $thisGroup to the count of records summarized by this summary field
Exit Loop If Get (CurrentRecord) + $thisGroup >= Get (FoundCount)
Go to record [Get (CurrentRecord) + $thisGroup]
End Loop
Export Field Contents [global field]
WriteTheRows - это пользовательская функция, которая выполняет следующие действия: вывод, который я пытаюсь записать, может быть отсортирован до 7различные критерии в одно и то же время (например: я мог бы суммировать продажи поставщиков за квартал или я мог бы суммировать продажи за квартал по поставщикам)
Compare the highest level sort field's value to the last value we found for the highest level sort field.
If they're different WriteALine to the global field for this sort field, the next sort field, all sort fields down to the lowest level.
If they're the same, compare the (highest level sort field - 1) to the stored value for the (highest level sort field - 1)
If they're the same, WriteALine to the global field for the (highest level sort field - 1) on down to the lowest level sort field
... repeat until we're down to the lowest sort field
WriteALine - еще одна пользовательская функция, которая добавляет соответствующуюметки, запятые и значения, используя GetSummary (доходаSummary; Evaluate ("summaryField" и summaryFieldNumber), как Чак предлагает в своем ответе.