public RegistroNotasAlumnoRpt GetDetailNotasReport(AlumnoInfo item, SortedBindingList <Alumno_ExamenInfo> list, CompanyInfo empresa) { if (item == null) { return(null); } RegistroNotasAlumnoRpt doc = new RegistroNotasAlumnoRpt(); List <AlumnoPrint> pList = new List <AlumnoPrint>(); List <Alumno_ExamenInfo> aList = new List <Alumno_ExamenInfo>(); pList.Add(item.GetPrintObject()); doc.SetDataSource(pList); foreach (Alumno_ExamenInfo info in list) { aList.Add(info); } doc.SetDataSource(pList); doc.SetParameterValue("Empresa", empresa.Name); //if (empresa.Oid == 2) ((CrystalDecisions.CrystalReports.Engine.FieldObject)(doc.Section5.ReportObjects["Empresa1"])).Color = System.Drawing.Color.FromArgb(13, 176, 46); doc.Subreports["NotasAlumnoListSubRpt"].SetDataSource(aList); return(doc); }
public CertificadoNotasRpt GetDetailReport(AlumnoInfo item, CompanyInfo empresa) { if (item == null) { return(null); } CertificadoNotasRpt doc = new CertificadoNotasRpt(); List <AlumnoPrint> pList = new List <AlumnoPrint>(); pList.Add(item.GetPrintObject()); doc.SetDataSource(pList); doc.SetParameterValue("Empresa", empresa.Name); if (empresa.Oid == 2) { ((CrystalDecisions.CrystalReports.Engine.TextObject)(doc.Section5.ReportObjects["Text1"])).Color = System.Drawing.Color.FromArgb(13, 176, 46); } FormatReport(doc, empresa); return(doc); }