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:

  1. 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.

  1. 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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -