Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello ladies and gentlemen. I am in need of your help guys. I am developing a system that manages students examinations for my school. I am developing most of the system core business layer using php.

Since I am not aware of any reporting tools in php I have decided to develop the system reports using Microsoft Reports. I have a challenge in getting the report that I have designed display information as I want.

I want the report to display details of a single student at a time and when I navigate to the next record I want the report updated with details of another student. The reason why I want this report to work this way is because I want to generate progress reports for all students who sat for an exam and the report must have a stand format which I have already designed.

I have a view that acts as the data source for a data set in visual studio 2013. The data set acts as the data source for my report.This is the code for the view.

CREATE VIEW AS
SELECT
exams.ExamType,
student_exam_marks.StudentID,
students.Fistname,
students.Lastname,
subjects.SubjectName,
student_exam_marks.TermMark,
student_exam_marks.ExamMark,
student_exam_marks.ExamGrade,
student_exam_marks.Comments,
student_exam_marks.AcademicYear
FROM
student_exam_marks
INNER JOIN students ON (student_exam_marks.StudentID = students.StudentID)
INNER JOIN subjects ON (student_exam_marks.SubjectID = subjects.ID)
INNER JOIN exams ON (student_exam_marks.ExamID = exams.ID)

This is the code that populates the report with data.

private void Form1_Load(object sender, EventArgs e)
{
this.exam_resultsTableAdapter.Fill(this.exam_management_systemDataSet.exam_results);
this.reportViewer1.RefreshReport();
}


I want something like for each student in a collection populate the report; one student at a time.


Hope my question doesn't need more clarification but in any case it does please feel free point that out because I need your help.
Posted
Updated 8-Apr-15 20:56pm
v3
Comments
CHill60 8-Apr-15 18:50pm    
What have you tried? Post the code you already have and explain the problem you are having with it
Moitsi Machola Nkwamba Sabata 9-Apr-15 2:50am    
This is the code that I have.

I have a view that acts as the data source for a data set in visual studio 2013. The data set acts as the data source for my report.This is the code for the view.

CREATE VIEW AS
SELECT
exams.ExamType,
student_exam_marks.StudentID,
students.Fistname,
students.Lastname,
subjects.SubjectName,
student_exam_marks.TermMark,
student_exam_marks.ExamMark,
student_exam_marks.ExamGrade,
student_exam_marks.Comments,
student_exam_marks.AcademicYear
FROM
student_exam_marks
INNER JOIN students ON (student_exam_marks.StudentID = students.StudentID)
INNER JOIN subjects ON (student_exam_marks.SubjectID = subjects.ID)
INNER JOIN exams ON (student_exam_marks.ExamID = exams.ID)

This is the C# code that populates the report with data.

private void Form1_Load(object sender, EventArgs e)
{
this.exam_resultsTableAdapter.Fill(this.exam_management_systemDataSet.exam_results);
this.reportViewer1.RefreshReport();
}

When I preview the report it shows records of all students. Not what I intended.

I want something like for each student in the list populate the report; one student at a time. Hope it makes sense
Sinisa Hajnal 9-Apr-15 4:03am    
You're populating the report with the view that contains all students and that is what you get. Use filters to select only single student.

Alternative is to write reports own functions that will show / hide all but currently selected item (And you'll have to provide a way to navigate around)

http://www.sqlchick.com/entries/2010/9/11/displaying-fixed-number-of-rows-per-ssrs-report-page.html

http://stackoverflow.com/questions/15292703/how-do-i-limit-the-number-of-rows-in-a-table-while-designing-a-rdlc-report

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900