Page 1 of 1

Adding relations from code, not showing up in designer control's dictionary

Posted: Fri Dec 09, 2011 3:51 am
by Jim
Hi

I wrote some code to add relations between the data sources, and I have tried adding them in the recommended way but they do not appear in the designer control's dictionary without manually selecting Actions->Synchronize. I am calling Synchronize from the code but it has no effect.

Code: Select all

report = stiWpfDesignerControl1.Report;
report.Dictionary.Relations.Clear();
//......
//this is inside a loop
if (child != null && parent != null)
{
	/*StiDataRelation dataRelation = new Stimulsoft.Report.Dictionary.StiDataRelation(
			r.SQLName, r.ParentName, r.ParentName, parent, child, parentid, childid);
	report.Dictionary.RegRelations();
	report.Dictionary.Relations.Add(dataRelation);*/ //these two methods work exactly the same, I have to manually synchronize to see the relations
	report.Dictionary.Relations.Add(
		new Stimulsoft.Report.Dictionary.StiDataRelation(
			r.SQLName, r.ParentName, r.ParentName, parent, child, parentid, childid)
		);
	break;
}
//end of loop
//......
report.Dictionary.Synchronize(); //none of this helps to refresh / synchronize the dictionary on the control, it has to be done manually
report.InvokeRefreshViewer();
stiWpfDesignerControl1.Refresh();
Could you please tell me where I'm going wrong?

Adding relations from code, not showing up in designer control's dictionary

Posted: Mon Dec 12, 2011 7:16 am
by Alex K.
Hello,

Can you please send us a sample project with test data which reproducess the issue for analysis.

Thank you.

Adding relations from code, not showing up in designer control's dictionary

Posted: Tue Dec 13, 2011 10:18 am
by Jim
Hi Aleksey

I unfortunately don't have the time to get a subsample of the database to email for reproduction of the error, as I'm going on leave soon and there are other priorities. I could email you just the project source code without the database, but I guess that would not be so useful.

Otherwise, I can always raise the issue again at a later date.

Thanks

Adding relations from code, not showing up in designer control's dictionary

Posted: Mon Dec 19, 2011 7:38 am
by Alex K.
Hello,

We check the issue on our test data and all work correctly.
Please send us a sample project with test data which reproducess the issue for analysis.

Thank you.

Re: Adding relations from code, not showing up in designer c

Posted: Fri Oct 19, 2012 12:34 pm
by rvdroer
Is this already solved? And if so what is the solution?

Re: Adding relations from code, not showing up in designer c

Posted: Fri Oct 19, 2012 12:59 pm
by Alex K.
Hello,

Please check the last prerelease build.

Thank you.