Hi Everyone,
I am making a crystal report with this SQl:
string sql = "select * from tbl_Student S inner join tbl_Result R on S.ID=R.ID_Student where S.ID=@ID";
I have 2 tables:
Table Student
ID| Name
01 | Jimmy
02 | Tom
Table Result
ID_Student|ID_Course|Result
01 |01 | A+
01 |02 | C
02 |01 | B+
02 |02 | A
My preview button :
frmDisplayReport report = new frmDisplayReport();
report.getDBO = this.dbo;
report.getSID = dtp.Value.ToString("ddMMyy") + "-" + txtSeq.Text;
string sql = "select * from tbl_Student S inner join tbl_Result R on S.ID=R.ID_Student where S.ID=@ID";
report.ViewReport("CrystalReport1.rpt",sql);
report.ShowDialog();
and my "ViewReport" with ID ( always have value) :
internal void ViewReport(string reportName,string SQL)
{
DataSet ds = new DataSet();
ds=dbo.ds_selectionSQL(SQL,ID);
ReportDocument rd = new ReportDocument();
string reppath = @"C:\Users\Toki Burke\Desktop\working\shigoto\Revive\Rvive\Report\CrystalReport1.rpt";
rd.Load(reppath);
rd.SetDataSource(ds.Tables[0]);
ReportViewer1.ReportSource = rd;
}
But the crystal report repeats a record of "(section 3) Details" for 5-6 times and then move to next report and repeat 5-6 times....
My "(section2) Page header" contains information of students, and my "(section3) Details" is with result of each course.
I want to data of "(section 3) Details" not to repeat.
This is my first time with crystal report (^.^!).
Sorry, my English is bad.
Please help me.
Thank in advance.