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

Stimulsoft Reports.WPF discussion
Post Reply
Jim
Posts: 5
Joined: Fri Jul 15, 2011 5:20 pm

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

Post 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?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

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

Post by Alex K. »

Hello,

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

Thank you.
Jim
Posts: 5
Joined: Fri Jul 15, 2011 5:20 pm

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

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

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

Post 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.
rvdroer
Posts: 2
Joined: Thu Oct 18, 2012 1:12 pm

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

Post by rvdroer »

Is this already solved? And if so what is the solution?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

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

Post by Alex K. »

Hello,

Please check the last prerelease build.

Thank you.
Post Reply