views:

46

answers:

2

Hello:

We are considering building a custom data processing extension for Microsoft Reporting Services in order to allow us to report directly off of our data objects.

My question: Suppose I have an object that represents the row, but it has a member that is a complex object:


public class TheRowObject
{
  // a "normal" field
  public string Name {get; set;}

  // a complex field object
  public Address BillingAddress { get; set;}
}

public class Address
{
  public string City {get; set;}
  public string State {get; set;}
  public string Zip {get; set}
}

I have no trouble putting TheRow.Name on the report, but what if I want to put TheRow.BillingAddress.City?

The report designer lets me drag BillingAddress onto the report surface, but at runtime, it displays the text "Error" in the field.

Is there a way to display members of complex objects?

EDIT What I'm really after, if it's possible, is for the end user to be able to drag properties of the complex object from the ReportData tool window right onto the report surface. I was hoping that there is some kind of built-in ability to do this in the report viewer.

If there is not a built-in way to handle that, I'm guessing I will need to either provide custom formulas within the report, or provide a data extension that "flattens" the properties of the complex object, so that they look like ordinary fields.

A: 

What if you edit the RDL or formula in free text. For example change TheRow.BillingAddress to TheRow.BillingAddress.City.

jms
That doesn't seem to work. When I edit the formula text, it shows the expression: =First(Fields!Name.Value, "ProviderCollection") (note, the "Value" field is not mine, must be part of the reporting wrapper). If I try to change it to use address.City, I get a build time error. I've tried various combinations of Address.Value.City, Address.City.Value, Address.Value.City.Value all to no avail.
JMarsch
A: 

It looks as though the short answer to this one was "no". I appreciate the responses, but it appears that reporting services expects simple data types as columns. If anyone learns something different, I'd love to hear about it.

JMarsch