Recently I got interesting issue. I developed the report based on RDP Class. I have to populate temp table. And based on this temp table I have to aggregate some calculation like sum, Average on Group by.
But when I populate another table based on this aggregation. Report starts to go long awaiting state. I dont know the reason. Later I found that I did not give active connection to temp table variables.
I added following line of code in reports and report processing reduce to less then 2 minutes