I am using this code to create a relation between two datasources:
Code: Select all
this.report = new StiReport();
this.report.RegData(source.Key, source.Key, source.Value);
this.report.RegData(source.Key, source.Key, source.Value);
...
this.report.Dictionary.Synchronize();
foreach (KeyValuePair<string, object> var in this.relations)
{
DataRelation relation = var.Value as DataRelation;
if (relation == null) continue;
StiDataRelation dataRelation = new StiDataRelation(
"rel_" + relation.Name,
relation.Name,
relation.Name,
this.report.Dictionary.DataSources[relation.ParentSource.Name],
this.report.Dictionary.DataSources[relation.ChildSource.Name],
relation.ParentColumns.ToArray(),
relation.ChildColumns.ToArray());
this.report.Dictionary.Relations.Add(dataRelation);
}
this.report.Dictionary.RegRelations();
this.report.Load(this.TemplateFile);
Do you know where the problem can coming from?
Thank you.
Jean-François