DataTable dtopdTreatment; string querysecond = "SELECT * FROM OPDPrescription AS opdPresc INNER JOIN content AS c ON opdPresc.contentid = c.id WHERE (((opdPresc.opdId)=" + id + ") AND ((opdPresc.[TypeOfTreatment])=1))"; dtopdTreatment = da.GetDataTable(querysecond.Replace("'", "")).Tables[0]; casereg.Subreports["RptTreatment"].Database.Tables["OPDPrescription"].SetDataSource(dtopdTreatment); casereg.Subreports["RptTreatment"].Database.Tables["Content"].SetDataSource(dtopdTreatment); crpOPDCaseRegister.ReportSource = casereg; crpOPDCaseRegister.Refresh(); dtopdTreatment.Clear();
I have Written Code Like Above
I am Using Crystal Report And and Dataset AS Datasource To bind To The Crystal Report.i am getting Duplicate Records in Crystal Reort.So How Can I Avoid The Duplication Of Records