Using interfaces in business objects
Posted: Thu Aug 26, 2010 4:49 am
Hello!
Some years ago I used your great reports in our projects. All was good because we bind them to the DataSets and Tables.
Today I changed work place and started new project. I want to use Stimulsoft here, but has some problems:
I can't bind report with BusinessObjects that contains Interfaces as return types in properties.
Here is the code:
When executes rep.Dictionary.SynchronizeBusinessObjects(3); I get NullReferenceException.
What I do wrong?
Thanks in advance.
Some years ago I used your great reports in our projects. All was good because we bind them to the DataSets and Tables.
Today I changed work place and started new project. I want to use Stimulsoft here, but has some problems:
I can't bind report with BusinessObjects that contains Interfaces as return types in properties.
Here is the code:
Code: Select all
public class Test
{
[DataMember]
public virtual Biz CurrentBiz { get; set; }
[DataMember]
public virtual Product CurrentProduct { get; set; }
[DataMember]
public virtual ITeam CurrentTeam { get; set; }
[DataMember]
public virtual ICompany Customer { get; set; }
[DataMember]
public virtual IPerson CustomerPerson { get; set; }
[DataMember]
public virtual string CustomerRef { get; set; }
[DataMember]
public virtual Guid? Status { get; set; }
[DataMember]
public virtual string DeliveryPoint { get; set; }
[DataMember]
public virtual Guid? PaymentTerms { get; set; }
[DataMember]
public virtual string Notes { get; set; }
[DataMember]
public virtual Subsidiary OrderFor { get; set; }
}
.....
var rep = new StiReport();
rep.RegBusinessObject("CRM", "Container", new Test());
rep.Dictionary.SynchronizeBusinessObjects(3);
rep.Design();
What I do wrong?
Thanks in advance.