_global item_test << _proc(a_ds_collection) # recursively generate rope of current table and all joined tables top << a_ds_collection tables << rope.new() tables.add(top) s << stack.new() s.add(top) _loop _if s.size = 0 _then _leave _endif tab << s.next() _for f _over tab.visible_fields.fast_elements() _loop _if ~ f.is_join? _then _continue _endif t << f.result_table(tab.source_view) _if t _is _unset _then _continue # skip text join field _elif ~ tables.includes?(t) _then tables.add(t) s.add(t) _endif _endloop _endloop # now generate items for tables s << internal_text_output_stream.new() _for t _over tables.fast_elements() _loop t.items_on(s) _endloop write(s.string) _endproc