DataSource Relations are Not working on tamplate with Code.
Posted: Wed Sep 04, 2013 12:35 pm
With my report datasource relations create issue when I use C# code. I have a template with controls, datasource and relation,
when i use XML file all relations are working file. please find an exampls with attachment.
But with Code all relations are fail. Code I use :
[/color]
when i use XML file all relations are working file. please find an exampls with attachment.
But with Code all relations are fail. Code I use :
Code: Select all
StiReport report1 = new StiReport();
report1.Load(templatePath);
DataSet ds = new DataSet();
DataReportFunction(ref ds);
// ds.Relations.Add("Prod_Comp_Info",ds.Tables["P"].Columns["productid"], ds.Tables["Child"].Columns["productid"]);
report1.Dictionary.DataSources.Clear();
report1.RegData(ds);
report1.Dictionary.Synchronize();
report1.Compile();
ds.Dispose();