Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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,

SQL
"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..! :)
Posted
Updated 3-Aug-11 5:34am
v3

1 solution

have u created any group on crystal report rpt file ?

If not then create a group of your primary key column in crystal report.

And drag the column which you want to display in group section.


I hope this will help you.
 
Share this answer
 
Comments
Dhananjay Borde 7-Aug-11 9:34am    
ya i tried tht ..
but not done..

plz help me...

its important for me :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900