Guys. I've been developing a school management system with java, MySQL and TIBCO Jasper Studio. But I've stuck in a certain point in generating a report. Here is my scenario.
I have two tables called "Student Details" and "Student Results".
In Student Details got "Student ID, Student Name" further Student Results got "Student ID, Subject Name, Grade".
My method of data populating to report is JRTableModelDataSource for Report page and Report table.
try with following solution,
short the dataset used by Student ID in SQL query as follows,
SELECT student_details.student_id, student_details.student_name, student_results.subject, student_results.grade FROM student_details INNER JOIN student_results ON student_details.student_id = student_results.student_id ORDER BY student_details.student_id
create a group based on student_id
field and set isStartNewPage
property to true,
field of student_id
<field name="student_id" class="java.lang.Integer">
......
</field>
group of student_id
<group name="student_id" isStartNewPage="true">
<groupExpression><![CDATA[$F{student_id}]]></groupExpression>
</group>