In tally developer samples there is a concept $$LoopObject ie multi company report from there you can get the collection of other company