Hi!!
I am making an application for generating report containing marks of students in various subjects with percentage and corresponding grades.
I have two forms one for "Entering marks" and other for "generating result" .
For "Entering marks" ,there are 5 combos and a textbox. From combos we can select type of exam(First Term,Half yearly and final term), class, section, subject,student and for this particular exam-class-section-subject-student combination I enter marks through textbox, which gets saved in database.
For generating result ,there are 4 combos for selecting type of exam(First Term,Half yearly and final term), selecting class , section,and student. Now for the selected student I want to create report which displays all the marks in various subjects along with percentage and grade.
Now how can I collect all marks of all subjects of any particular student and calculate percentage of it .
Kindly provide some solution...............

Recommended Answers

All 6 Replies

I enter marks through textbox, which gets saved in database.

If you've stored them in the database what is stopping you from retrieving them again. Is it a database of your own design?

If you've stored them in the database what is stopping you from retrieving them again. Is it a database of your own design?

In database , in result table for "exam-class-section-subject-student" combination marks are being entered .
Now while calculating percentage how can I collects all marks of all subjects of any particular student and find the corresponding percentage ...........?

You've told us much about the main window but nothing about what type of database are you using. Is it a situation where LINQ can be used?

I am not sure if you are ok with one plain average: here is SQL for one student (paramter = @yourInput)

select avg(marks) 
from exam-class-section-subject-student 
where student_ID = @yourInput

if you wanted average for all sytudents

select student_ID, avg(marks) 
from exam-class-section-subject-student 
group by student_ID

and so on.. Of course there needs to be more than this in any real-life application, like getting student name or average by exam type, year (like 2009 / 2010 etc) and more where conditions.
I advise you refresh you SQL.

You've told us much about the main window but nothing about what type of database are you using. Is it a situation where LINQ can be used?

I am using MS Access2007

you can try as suggested by padtes

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.