Hi Janis,
Thanks for your time and help your code really helped me to identify the missing point in my code, now my report does work fine when executing in back end however when the same program is being called from IE it says " The website cannot display the page" HTTP 500 Internal server error.
p.s standalone program is working fine.