Tutorial :Microsoft Reporting and Complex Objects



Question:

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.


Solution:1

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.


Solution:2

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


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »