-
July 16th, 2011, 11:45 AM
#1
passing two queries in CR
hi.. i m making a university project on a dental clinic
i have two tables one containing information abt the visits in a dental clinic(tbl_daily_opd) and the other containing the details of the patient(tbl_patient).. tbl_daily_opd contains only the id of the patient.. i m printing tbl_daily_opd in the report with the patient name n id...
i also want to count the number of males and females on a particular date... and how many patients recieved a just medication and now many tooths were extracted(the column 'treatment' in tbl_daily_opd contains this information)..
how do i do this? by passing two queries in CR or is there some option in the expert editor which can accept select queries?
i m using c# in vs2005.. crystal reports 10
thanks..
-
July 18th, 2011, 02:59 PM
#2
Re: passing two queries in CR
Welcome to CodeGuru forums!
It doesn't accept 2 queries but it allows to link the tables, in this case you may link the tbl_daily_opd table to tbl_patient table using the id of the patient...
once the tables are linked you may use all the fields from each table
JG
-
July 19th, 2011, 01:11 PM
#3
Re: passing two queries in CR
Thanks :-)
yes but my prob is if i put a count on tbl_patient where gender = male.. it returns the no of all the male patient rather than those males who came on a particular date..
-
July 19th, 2011, 01:23 PM
#4
Re: passing two queries in CR
Originally Posted by biit
Thanks :-)
yes but my prob is if i put a count on tbl_patient where gender = male.. it returns the no of all the male patient rather than those males who came on a particular date..
You may add an : AND {Table.Date} = {?particulardate} to the Count condition
JG
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|