【发布时间】:2014-12-03 10:46:11
【问题描述】:
- 我正在尝试向报表查看器添加一个 dll,以便我可以使用该 dll 中的方法解码其中一个字段内容(在报表中)。
- 我在报告属性 --> 参考中添加了一个 dll。
- 类库中的所有方法(用于创建 dll)都是静态的。
-
该类库中类的内容:ABCClass.cs(用于创建dll ABCCollection.dll)
namespace ABCCollection { public class ABCClass { public static string CustomFormatString(string s) { //perform some operation on s return s; } } }
在 Report1.rdlc 中,我将字段的值用作:
=ABCCollection.ABCClass.CustomFormatString("testing")
但是一旦我运行这个报告,我就会收到如下错误:
Error while loading code module: ‘ABCCollection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly 'ABCCollection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
有人可以帮我解决这个问题吗?
【问题讨论】:
标签: visual-studio-2010 visual-studio dll reporting-services reportviewer