about StiDataRelation

Stimulsoft Reports.NET discussion
Post Reply
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

about StiDataRelation

Post by lampson »

I have already set up ,but unable to load data in the code .
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

about StiDataRelation

Post by Edward »

Hi

Here is an example of custom registration of DataRelation from code using Demo database which you will find as a part of standard trial installation of Stimulsoft Reports.Net

StiReport report = new StiReport();
DataSet ds = new DataSet("Demo");
ds.ReadXml("D:\\demo.xml");
report.RegData(ds);
report.Dictionary.Synchronize();
StiDataRelation dataRelation = new StiDataRelation("MyRelation", report.Dictionary.DataSources["Categories"], report.Dictionary.DataSources["Products"], new System.String[]{"CategoryID"}, new System.String[] {"CategoryID"});
report.Dictionary.RegRelations();
report.Dictionary.Relations.Add(dataRelation);
report.Design();

Happy New Year!

Thank you.
Post Reply