6 Replies Latest reply on Feb 10, 2010 11:04 AM by Oscar Scudder

    reports

    Oscar Scudder

      Title

      reports

      Post

      I have built a data base to store my class regtration and student info but when i load a report which is a sign in sheet it loads all the students from all the classes. Is there a way to load only the student from on class.

      Each class has it own class id number. I have been fighting with this for 3 days help any one.

        • 1. Re: reports
          philmodjunk
             Perform a find to find all records for a given class ID number. This can be done by hand or with a script.
          • 2. Re: reports
            Oscar Scudder
              

            Is there a way to script it so when im looking at the class and it say there is 9 people in there and i click on the sign-in sheet that it just shows me the name that are in that class.

             

            The first solution  will work but i am looking to make it easy for me and employees

             

            Thanks for the first solutio it helps

            • 3. Re: reports
              philmodjunk
                

              Yes, there's almost certainly a way to set up a script to do this.

               

              What tables and fields have you set up in your database?

               

              If you have more than one table, how have you linked them in your relationship graph (Manage | Database | Relationships)?

              • 4. Re: reports
                Oscar Scudder
                  

                Tables:   

                 

                Course Register:  and fields in this on are course id, Course type, Class Start Date, Class End Date, Course Start Time and end time, Location of class, Location address

                 

                Students: Student Id, First Nam, Last Name, Address, Course Id, Course Id, Start Date and end date, Course Start Time and End time

                 

                Classes: Course type, Course Description, Course category

                 

                Instructors: First Name, Last Name, Type of training

                 

                Invoice: working on this still

                 

                • 5. Re: reports
                  philmodjunk
                    

                  Before we get into how to script what you want, you need to look a bit more closely at your tables:

                   

                  Students: Student Id, First Nam, Last Name, Address, Course Id, Course Id, Start Date and end date, Course Start Time and End time

                   

                  Should be replaced with two tables. With the current setup you will duplicate data stored in your database for every student that registers for more than one class.

                   

                  Set it up this way: (Bold field names should be auto-entered serial numbers and function as Primary keys.)

                   

                  Students: Student Id, First Name, Last Name, Address, cFullName: Last Name & ", " & First Name

                   

                  Classes: ClassID, Course Description, Course Category

                   

                  Course Schedule: CourseID, ClassID, Offering Title, Class Start Date, Class End date, Course start time, end time, location

                   

                  Student Register: CourseID, StudentID

                   

                  In your relationship graph you would set up the following:

                  Students::Student ID = Student Register::StudentID //enable "Allow creation of records..." for Student Register here//

                  Course Schedule::CourseID = Student Register::CourseID //enable "Allow creation of records..." for Student Register here//

                  Course Schedule::ClassID = Classes::ClassID

                   

                  How these tables work:

                   

                  Let's say you offer a class, Algebra I, at two different locations and/or times/dates.

                  You create one record in Classes to document the details for Algebra I

                  You create two records in Course Schedule to document the two different times/locations that it is offered.

                  Each time a new student registers to attend at least one class, you create a student record in students.

                  Each time they sign up for a specific course offering, you make one record in Student register that links that student's student record to a course offering in Course Schedule.

                   

                  Now to create your sign in sheet:

                  Define a global text field gSelectCourse (add the field in Manage | Database | Fields, click options, click the storage tab and choose "global storage")

                  Create a layout and specify that the records come from Student Register.

                  Add the student name fields from the Students table so that you will see a list of student names here for those who are registered for the course.

                  Place gSelectCourse on the header of this layout and format it with a value list with Course Schedule::CourseID in column 1 and Course Schedule:: OfferingTitle in column 2 (Use this text field to uniquely name each offering in the schedule so that you can tell them apart (Algebra I at George Smith Ctr, 5pm-for example).

                   

                  Write a script like this:

                  Enter Find Mode [] // clear the "pause" option//

                  Set field [Course Schedule::CourseID; Course Schedule::gSelectCourse

                  Set Error capture [on]

                  Perform Find []

                  If [ get (foundcount) = 0 /* no students are registered for this course */]

                     Show custom dialog ["no students are registered for this course"]

                  Else

                     Sort [Restore] //specify a sort order that you need here. You can sort by Students::Last Name, Students:: First Name to sort the records alphabetically//

                  End If

                   

                  Note that there's a lot you need to do here to set up layouts to register students for a given course. One way is to place a portal to Student Register on a Course Register layout and place Student Register::StudentID and add Student name fields from Students in the portal row. You make studentID a drop down list with students::Student ID in column 1 and students::cFull Name in column 2. Selecting a student in the bottom blank row will create a new Student register record that registers that student for the selected course.

                  • 6. Re: reports
                    Oscar Scudder
                      

                    Thanks

                    I will try this.

                    I currently rebuilding the data base I did not like how i did the first time.

                    Thanks for the input and I'm sure i will have more question.

                     

                    This is all new to me and I'm learning how to use filemaker.