Pivot reporting framework

maybe use `view` instead of `toStream`?