public override void PrintList() { PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this); LoanReportMng reportMng = new LoanReportMng(AppContext.ActiveSchema); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); LoanListRpt report = reportMng.GetListReport(List); PgMng.FillUp(); ShowReport(report); }
/*private static void FormatReport(PrestamoRpt rpt, string logo) * { * string path = Images.GetRootPath() + "\\" + Resources.Paths.LOGO_EMPRESAS + logo; * * 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; * } * }*/ #endregion #region Business Methods //public PrestamoRpt GetDetailReport(LoanInfo item) //{ // if (item == null) return null; // PrestamoRpt doc = new PrestamoRpt(); // List<PrestamoPrint> pList = new List<PrestamoPrint>(); // pList.Add(PrestamoPrint.New(item)); // doc.SetDataSource(pList); // doc.SetParameterValue("Empresa", Schema.Name); // List<PaymentPrint> pPagos = new List<PaymentPrint>(); // foreach (PaymentInfo child in item.Payments) // { // pPagos.Add(PagoPrint.New(child)); // } // doc.Subreports["PagoSubRpt"].SetDataSource(pPagos); // //FormatReport(doc, empresa.Logo); // return doc; //} public LoanListRpt GetListReport(LoanList list) { if (list.Count == 0) { return(null); } LoanListRpt doc = new LoanListRpt(); List <PrestamoPrint> pList = new List <PrestamoPrint>(); foreach (LoanInfo item in list) { pList.Add(PrestamoPrint.New(item)); } doc.SetDataSource(pList); FormatHeader(doc); return(doc); }