Performance tuning of withdraw report

Replacing direct joining to slow views with temporary tables.