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
Do not geting all from both table in linq to sql reporting ?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Kiran Kumar TalikotiRank #814 · 2.8K reputationPosted Sep 5, 2013, 4:35 AM EDT
your linq query is correct,check whether matching rows are there in both Course Table and student table.
Mukesh Kumar TiwariRank #1,774 · 844 reputationPosted Sep 5, 2013, 8:49 PM EDT
Matching record are in both table..
course table has id as primary key.
and student table has course_id as a foreign key...
And my grid is fill from the same query completely.
but dnt getting what is the problem in reporting.......
Thanks..........