private void FormatReport(CertificadoNotasRpt rpt, CompanyInfo empresa)
        {
            string path = CompanyInfo.GetLogoPath(empresa.Oid);

            if (File.Exists(path))
            {
                Image image  = Image.FromFile(path);
                int   width  = rpt.Section1.ReportObjects["Logo"].Width;
                int   height = rpt.Section1.ReportObjects["Logo"].Height;

                rpt.Section1.ReportObjects["Logo"].Width  = 15 * image.Width;
                rpt.Section1.ReportObjects["Logo"].Height = 15 * image.Height;
                rpt.Section1.ReportObjects["Logo"].Left  += (width - 15 * image.Width) / 2;
                rpt.Section1.ReportObjects["Logo"].Top   += (height - 15 * image.Height) / 2;
            }
        }
        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);
        }