c# - Error parentkey and childkey are identical in Stimulsoft -
i want created master-detail report.
i have 2 classes paystub & payments payments have foreignkey of paystubid.
public class paystub { public int paystubid { get; set; } public int code { get; set; } public string name { get; set; } } public class payment { [foreignkey("paystub ")] public int paystubid { get; set; } public paystub paystub { get; set; } public int amount{ get; set; } public string description{ get; set; } } i've tried 2 ways:
business object.insert parent business object & child business object , in wpf.
report.regbusinessobject("paystub", paylist); report.regbusinessobject("payments", paymentlist);
this show master , don't show detail.
- datatable.insert 2 datatable , relation this.
in wpf:
report.regdata("paystub", paylist); report.regdata("payments", paymentlist); i error parentkey , childkey identical.
i change models this.
public class paystub { public int paystubid { get; set; } public int code { get; set; } public string name { get; set; } public list<payment> payments{ get; set; } } public class payment { [foreignkey("paystub ")] public int paystubid { get; set; } public paystub paystub { get; set; } public int amount{ get; set; } public string description{ get; set; } }
and set payments value in psystublist.
and set businessobject paystub
report.regbusinessobject("paystub", paylist);
Comments
Post a Comment