Hi,
U can also go through this link and also try the following code.
http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/f44516e2-36c3-45dd-8318-fcdf4a8113b9/
Code:-
<appsettings>
<add key="production" value="http://www.production.com">
<add key="ProductionconnectionString" value="server=localhost;...." >
<add key="testconnectionString" value="server=localhost;...." >
</appsettings>
Public Application_BeginRequest()
{
bool production=false;
if(Request.URL.Host==ConfiqurationManager.Appsettings("production"))
{
Production=true;
}
}
if(Production==true)
{
context.items.add("connectionStrings",ConfiqurationManager.Appsettings("production"))
}
else
{
context.items.add("connectionStrings",ConfiqurationManager.Appsettings("test"))
}
}
Enjoy

Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
Regards,
Bhaumik