I would like to thank everyone for helping resolving this query.As of
now this thread can be closed, I have pasted my script above, which
works for now.I will try to take it to next level and will open thread
for discussing issues with this reporting automation.ThanksPB