public PagoAcreedorDetailRpt GetPagoAcreedorDetailReport(PaymentSummary item, Payments pagos)
        {
            if (item == null)
            {
                return(null);
            }

            PagoAcreedorDetailRpt doc = new PagoAcreedorDetailRpt();

            List <PaymentPrint>   pagosList = new List <PaymentPrint>();
            List <PaymentSummary> pList     = new List <PaymentSummary>();

            foreach (Payment pago in pagos)
            {
                pagosList.Add(PaymentPrint.New(pago.GetInfo(true), null, false));
            }

            //Si no existen conceptos, no tiene sentido un informe detallado. Además, falla en Crystal Reports
            if (pagosList.Count <= 0)
            {
                return(null);
            }

            pList.Add(item);

            doc.SetDataSource(pList);
            doc.Subreports["Cuerpo"].SetDataSource(pagosList);

            FormatHeader(doc);

            return(doc);
        }
Esempio n. 2
0
        public override void PrintObject()
        {
            PgMng.Reset(3, 1, Face.Resources.Messages.BUILDING_REPORT);

            PaymentReportMng reportMng = new PaymentReportMng(AppContext.ActiveSchema, Resources.Labels.PAGOS, "Acreedor = " + Entity.Nombre);

            PgMng.Grow();

            PagoAcreedorDetailRpt report = reportMng.GetPagoAcreedorDetailReport(Summary, _entity.Pagos);

            PgMng.FillUp();

            ShowReport(report);
        }