'sub-property' access in expressions. RRS feed

  • Question

  • Hi,

    I've just upgraded a project from .NET 2.0 in VS 2008 to .NET 4.0 in 2010, it uses the ReportViewer in local processing mode bound to my own business objects.

    My reports used to handle the following expressions without any problems:

    =First(Fields!Customer.Value.ID, "Core_BusinessObjects_SalesOrder")

    Where SalesOrder is a class with a property called Customer, of type Customer, which has an Integer property called ID. This worked fine before, but the expression now returns '#ERROR'. I tried changing it to '=First(Fields!Customer.Value, "Core_BusinessObjects_SalesOrder").ID', but that didn't work either.

    The Customer class has as a data set in the RDLC bound to the actual customer object (I think this was required in the previous version to get this 'sub-property' access to work). I could change all these types of expressions to, in this case, '=First(Fields!ID.Value, "Core_BusinessObjects_Customer")', but would rather find a solution that didn't require changing each individual expression if possible.

    Is there some other way of accomplishing this, or is this kind of expression no longer supported?


    Thursday, October 28, 2010 6:23 AM