passing two queries in CR
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: passing two queries in CR

Hybrid View

  1. #1
    Join Date
    Jul 2011
    Posts
    1

    Question 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..

  2. #2
    Join Date
    Jul 2005
    Posts
    1,076

    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

  3. #3
    Join Date
    Jul 2011
    Posts
    1

    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..

  4. #4
    Join Date
    Jul 2005
    Posts
    1,076

    Re: passing two queries in CR

    Quote Originally Posted by biit View Post
    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center