I'm developing some reports in SSRS 3.0, and I've hit a snag. I've got a .NET method that I need to call, and I can't get it to work. I've found a few "how to" websites that purportedly explain the process, but I can't seem to make it work. As a first experiment, to just prove I can do this, I've written a little "HelloWorld" program that just returns two strings concatenated together with a space between:
using System;
namespace HelloWorld
{
public class Hello
{
public static string SayHello(string hello, string world)
{
return hello + " " + world;
}
}
}
I've got the reference defined in the Report Properties / References tab; but when I try to run it, I get
Error while loading code module: ‘HelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly 'HelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
I've copied the DLL to numerous suggested locations:
- C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies
- C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies
- C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\Reporting Services\ReportServer\bin
- The folder with the RDL file
Nothing seems to work.
I've seen reference to editing the rssrvpolicy.config file; but my system doesn't have one. I could create it, but I don't know where to put it.
I'm using Visual Studio 2010, Report Builder 3.0, and SQL Server CE (I have SQL Server installed on my dev machine as well; but it will not be on the target machines). We will not be using a Report Server -- the target machines are all standalone, and very few will have network access.
If there's any other information I can provide, please let me know. And thanks for any suggestions you may have.