BI Publisher report not working on Server

HI I have created a new report which is calling another report and from called report the RD gets submitted.When I tried to execute it locally it worked,It produces XML file and If I load it manually on the template it produces a valid output;But when I deployed the project on server and when I tried to run it on testing environment it directly goes into 'error',I have uploaded the BI template in the repository ,I tested the code locally in DV environment but its somehow not working on server, can anybody suggest me a solution,I also want to send an email when RD gets submitted, TO achieve that I have checked the 'data driven mail E-Mail' option. Can anybody suggest me a solution??