c# - RDLC report not recognizing inherited interface members when a child interface is set as a dataset -
say have these 2 interfaces
interface iparentbusinessobject { string property1 { get; } string property2 { get; } } interface ichildbusinessobject : iparentbusinessobject { int property3 { get; } string proeprty4 { get; } } if try set ichildbusinessobject dataset through visual studio 2013 report wizard, recognize members property3 , property4, not recognize inherited members property1 , property2. when setting dataset, make sure interfaces in inheritance hierarchy available choose from. example, choose iparentbusinessobject 1 dataset report on property1 , property2, or can choose ichildbusinessobject , report on property3 , property4.
some other information may important
- all of interfaces , classes datasets located in separate assembly reports.
- when use concrete class dataset instead of interface can see members, including inherited ones.
- when using interface dataset, members
systemtypes recognized. of types i've defined not show up. (again, not problem concrete classes). - if setup report interface dataset, try type out should expressions inherited property, errors thrown. (expression example:
=fields!property1.value)
does know how can make these rdlc reports recognize interface members in full?
just using concrete class dataset fixes this. however, avoid exposing concrete types outside assemblies if @ possible. until point code has worked great operating off interfaces, , don't want expose these business objects outside code, internalsvisisbleto, accommodate reporting software.
Comments
Post a Comment