Mukesh Kumar Tiwari

Mukesh Kumar Tiwari

  • NA
  • 980
  • 251.4k

Do not geting all from both table in linq to sql reporting ?

Sep 5 2013 8:23 AM
hi frnds
i m going to generate a Cristal report  in vs 2008. and i m using join but i dnt get the records from another table.Means i get record from course table only.

My Code is here:

var stud_info = (from student in obj_link.students
                             join course in obj_link.courses
                              on student.course_id equals course.id
                             select new
                             {
                                 student.stud_id,
                                 student.student_name,
                                 student.address,
                                 student.city,
                                 student.mobile_no,
                                 course.course_name,
                                 course.course_desc
                             }).ToList();       
           
            CrystalReport1 rpt = new CrystalReport1();          
            rpt.SetDataSource(stud_info);
            crystalReportViewer1.ReportSource = rpt;

Records r retrieving only from course table.
pls give response...
thanks to all
 

Answers (2)