<p>I have successfully added a custom assembly, added it to the report using <code>AddTrustedCodeModuleInCurrentAppDomain</code>. I am executing the report in the current appdomain.</p>

<p>When I try to access SQL I get reporting services <code>System.Data.SqlClient.SqlClientPermission failed.</code> I have tried adding <code>System.Data</code> to the trusted assemblies as above but it doesn't help.</p>

<p>How do I ensure that this permission is present?</p>

If you're running IIS6 the guys at OrcsWeb have a nice wee article -
http://weblogs.asp.net/owscott/archive/2004/01/12/57916.aspx
We have customers running the port80 software because they get more control:
http://www.port80software.com/products/zipenable/
http://www.port80software.com/products/httpzip/