create temp tables
finalize first iteration of the report