def generate(self, ledgers, report):
        it = report.generate(ledgers)
        # save total
        total = next(it)
        count = 0
        for entry in it:
            components = entry.amount.components()
            for component in components[:-1]:
                yield self.print_value(component)
            yield self.print_value(components[-1]) + \
                ("  " * (entry.level - 1)) + \
                self.colored(self.ACCOUNT_COLOR, entry.account)
            count += 1
        if count > 0:
            yield "-" * 20
            for component in total.amount.components():
                yield self.print_value(component)