Report Binding MVVM

7 posts, 0 answers
  1. Ubuntu
    Ubuntu avatar
    89 posts
    Member since:
    Jul 2012

    Posted 08 Jun 2011 Link to this post

    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
  2. Joao Paulo Grassi
    Joao Paulo Grassi avatar
    98 posts
    Member since:
    Feb 2011

    Posted 08 Jun 2011 Link to this post

    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.
  3. DevCraft banner
  4. Ubuntu
    Ubuntu avatar
    89 posts
    Member since:
    Jul 2012

    Posted 08 Jun 2011 Link to this post

    ACTUALLY, I DID TWO TIMES.
    CAN YOU POINT OUT YOUR IDEA.
  5. Joao Paulo Grassi
    Joao Paulo Grassi avatar
    98 posts
    Member since:
    Feb 2011

    Posted 08 Jun 2011 Link to this post

    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 ;
    }
  6. Adam
    Adam avatar
    2 posts
    Member since:
    May 2012

    Posted 17 May 2012 Link to this post

    That is not an acceptable solution for MVVM. 
  7. tung ngie
    tung ngie avatar
    14 posts
    Member since:
    Nov 2009

    Posted 24 May 2013 Link to this post

    I am still learning on MVVM.

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

    Thanks!
  8. KS
    KS avatar
    165 posts
    Member since:
    Oct 2012
Back to Top
DevCraft banner