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...............
vinnijain 0
Junior Poster
Recommended Answers
Jump to PostI 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?
Jump to PostI 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
All 6 Replies
jonsca 1,059
Quantitative Phrenologist Team Colleague Featured Poster
vinnijain 0
Junior Poster
jonsca 1,059
Quantitative Phrenologist Team Colleague Featured Poster
padtes 30
Junior Poster in Training
vinnijain 0
Junior Poster
avirag 10
Posting Whiz
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.