This is a migrated thread and some comments may be shown as answers.

Report Binding MVVM

6 Answers 220 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ubuntu
Top achievements
Rank 1
Ubuntu asked on 08 Jun 2011, 12:19 PM
Dear all,

How can I bind the report to a data in a MVVM scenario.
I am using PRISM4(MEF), SL, RIA service.

I setup everything for the report to work using the EF connection, How can I do the binding to EF queries from the VM.

Best regards

6 Answers, 1 is accepted

Sort by
0
Missing User
answered on 08 Jun 2011, 12:54 PM
Hi Ubuntu

I think you are missing something, did you watched the Getting started movies from telerik TV?

http://tv.telerik.com/watch/reporting/video/getting-started-with-telerik-report-viewer-silverlight

See if helps.
0
Ubuntu
Top achievements
Rank 1
answered on 08 Jun 2011, 01:56 PM
ACTUALLY, I DID TWO TIMES.
CAN YOU POINT OUT YOUR IDEA.
0
Missing User
answered on 08 Jun 2011, 03:05 PM
Hello.

I don't know if you can bindind the datasource of the report to something in the view model, i too use SL with Prism and LInq to Class
i have a small report that brings me the peoples by department, i pass a parameter for the report in the Silverlight Application and receive in the NeedDataSource, look a example:

void PersonReport_NeedDataSource(object sender, EventArgs e)
{
    GuidID = new Guid(this.ReportParameters["ID"].Value.ToString());
 
         //Create a List and call a Class that return a list of People by Department ID
         List<Person> lstPerson = new PersonDao().GetPersonsByDepartment(ID);
 
          //Set list to Report Datasource
    this.DataSource = lstPerson ;
}
0
Adam
Top achievements
Rank 1
answered on 17 May 2012, 04:43 PM
That is not an acceptable solution for MVVM. 
0
tung ngie
Top achievements
Rank 1
answered on 24 May 2013, 08:19 AM
I am still learning on MVVM.

May I know how it is supposed to be in order to be MVVM?

Thanks!
0
KS
Top achievements
Rank 1
answered on 24 May 2013, 05:39 PM
Tags
General Discussions
Asked by
Ubuntu
Top achievements
Rank 1
Answers by
Missing User
Ubuntu
Top achievements
Rank 1
Adam
Top achievements
Rank 1
tung ngie
Top achievements
Rank 1
KS
Top achievements
Rank 1
Share this question
or