Hello friends,
I am stuck at one point in my project where I want to select and show only that record in report for which I have taken its primary key value form user in text box.
I think I have to pass the value through parameter. If am right then please tell me the steps.
What I did I designed report and created one form on which I shown the report in crystal report viewer.Also I used dataset which I filled using adapter with the query.The query was like,
"SELECT s.regno,s.fname,s.lname,s.mname,n.ntpname,c.eduration,c.emarks FROM NTP n,student s,registration r,course c where c.cid = r.cid and s.regno=r.regno and n.ntpregno = s.ntpregno and s.regno='" & txtRegNo.Text.ToString & "'"
But it is showing me all the records in report means query behaving like,
"SELECT s.regno,s.fname,s.lname,s.mname,n.ntpname,c.eduration,c.emarks FROM NTP n,student s,registration r,course c where c.cid = r.cid and s.regno=r.regno and n.ntpregno = s.ntpregno"
and if I show same result in datagridview then it gives proper result,means like first query.Am not getting where the problem happening.
Please help.
Thanks in Advance..! :)