0

I need to show a table with a list of inherited objects. For example:

public abstract class Animal
{
    public string Name { get; set; }
    public abstract string Detail { get; }
}

public class Dog : Animal
{
    public override Detail { get { return "A dog"; } }
}

public class Cat : Animal
{
    public override Detail { get { return "A cat"; } }
}

It seems that the datasource takes de first object class type and the other objects shows with #ERROR How I can fix it?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Nicolás
  • 3
  • 2

1 Answers1

0

You need to map your properties using the expressions area. If you want to show a column with the cats details, add this to the expression for that field.

=Fields!Cat.Value.Detail
BigBadOwl
  • 669
  • 2
  • 9
  • 22