Specifying Property Name

Specifying Property Name

Forum member · Jun 3, 2011
I am interested in designating the data source of report writer to a collection. Is it possible to specify a property of an object for the field of a record box? Example: In the Designer we have the record box. We can specify the property in the field and that works beautifully. Field: FirstName However, If I want to specify a property of an object as in Field: Employee.FirstName I receive an exception. Any help would be greatly appreciated.

Re: Specifying Property Name

Support · Jun 3, 2011
Hello, You can specify a collection of object as a data source, please refer to this example on how to do so. In your case if you have assigned a collection of Employee objects as a data source to the dplx file, when you specify the property name in the record box just use “FirstName” instead of prefixing it with the object name. Thanks, ceTe Software Support Team.

Re: Specifying Property Name

Forum member · Jun 6, 2011
I understand binding to the object and using the simple properties of the object. But I was not clear, my apologize. A better example of binding would be an Employee object. But I want to bind a property of an object within the employee object such as an address.street1. Employee.Address.Street1 So Object would look like: Employee FirstName LastName Address Street1 Street2 City Etc

Re: Specifying Property Name

Support · Jun 6, 2011
Hello, It is not possible to bind the properties of the nested class, you can only bind the simple properties of the class. As a workaround you may create a new read-only property in the Employee class that returns the Address.Street1 property and bind the read-only property. Thanks, ceTe Software Support Team.