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..
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
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..
Re: passing two queries in CR
Quote:
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