CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Posts
    2

    How can i make report from relational database

    Hi there

    I have a problem in crystal report. I have a database which is totally relational. About 10 table with one to many or many to many relationship.
    I want to create report from these tables but I don't know how.
    My problem is:
    I have 4 tables for saving information about students, Courses, coursestudentjunction and grades. I want to report the grades of each student for all courses for each major that student registered to.

    In my report I want to show the student information on page header and course and grades on detail section.
    When I try to do so the crystal can not link tables.
    What I have to do make this?
    I do my best but I can't find the solution.

    Here are the details about my tables:
    tblStudent:Studentid,fname,lname,…majorID(FK)
    tblcourse:courseid,coursename,majorID
    tblstuCoursJunc: JuncID,studentID,courseID
    tblGrades:GradesID,JuncID(fk),grades,gradesDate

    The attachment is the access file of relationship.
    What i want is creating course lists of different major and include their number for each student.

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2009
    Posts
    17

    Re: How can i make report from relational database

    Try using the following link

    link from tablstudent:majorID to tblcourse:majorID and from tblecourse:courseid to tblstuCoursJunc:courseID. link from tblstuCoursJunc: JuncID to tblGrades:JuncID(fk)

    Basically find the common key to join. ie. majorid to majorid, coureid to courseid and juncid to juncid from its respective table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured