C# 将子接口设置为数据集时,RDLC报告无法识别继承的接口成员
假设我有这两个接口C# 将子接口设置为数据集时,RDLC报告无法识别继承的接口成员,c#,inheritance,reporting-services,interface,rdlc,C#,Inheritance,Reporting Services,Interface,Rdlc,假设我有这两个接口 interface IParentBusinessObject { string Property1 { get; } string Property2 { get; } } interface IChildBusinessObject : IParentBusinessObject { int Property3 { get; } string Proeprty4 { get; } } 如果我试图通过Visual Studio 2013报
interface IParentBusinessObject
{
string Property1 { get; }
string Property2 { get; }
}
interface IChildBusinessObject : IParentBusinessObject
{
int Property3 { get; }
string Proeprty4 { get; }
}
如果我试图通过Visual Studio 2013报表向导将IChildBusinessObject
设置为数据集,它将识别成员Property3
和Property4
,但不会识别继承的成员Property1
和Property2
。在设置数据集时,我确保继承层次结构中的所有接口都可供选择。例如,我可以选择IParentBusinessObject
作为一个数据集来报告Property1
和Property2
,或者我可以选择IChildBusinessObject
,只报告Property3
和Property4
其他一些可能很重要的信息
- 我的数据集的所有接口和类都位于与我的报表不同的单独程序集中
- 当我使用一个具体的类作为数据集而不是接口时,我可以看到所有成员,包括继承的成员
- 将接口用作数据集时,仅识别
类型的成员。我定义的所有类型都不会显示。(同样,具体类没有问题)System
- 如果我使用接口作为数据集设置报表,然后尝试键入应该是什么表达式以获得继承属性,则会抛出错误。(表达式示例:
)=Fields!Property1.Value
InternalsVisisbleTo
,只是为了适应此报告软件