开发者

Microsoft Reporting and Complex Objects

开发者 https://www.devze.com 2022-12-20 09:58 出处:网络
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.

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;}
开发者_StackOverflow}

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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消