public ReportClass GetWorkDeliveryList(OutputDeliveryList list, ExpedienteList expedients)
        {
            if (list.Count == 0)
            {
                return(null);
            }

            OutputDeliveryListRpt doc = new OutputDeliveryListRpt();

            List <OutputDeliveryPrint> pList = new List <OutputDeliveryPrint>();

            foreach (OutputDeliveryInfo item in list)
            {
                pList.Add(OutputDeliveryPrint.New(item, expedients.GetItem(item.OidHolder)));
            }

            doc.SetDataSource(pList);

            FormatHeader(doc);

            ((TextObject)doc.Section2.ReportObjects["IDHolder_LB"]).Text          = Library.Store.Resources.Labels.WORK_ID;
            ((TextObject)doc.Section2.ReportObjects["Holder_LB"]).Text            = Library.Store.Resources.Labels.WORK;
            doc.Section2.ReportObjects["NFactura_LB"].ObjectFormat.EnableSuppress = true;

            return(doc);
        }
        public ReportClass GetListReport(OutputDeliveryList list,
                                         ClienteList clientes)
        {
            if (list.Count == 0)
            {
                return(null);
            }

            OutputDeliveryListRpt doc = new OutputDeliveryListRpt();

            List <OutputDeliveryPrint> pList = new List <OutputDeliveryPrint>();

            foreach (OutputDeliveryInfo item in list)
            {
                pList.Add(OutputDeliveryPrint.New(item,
                                                  clientes.GetItem(item.OidHolder),
                                                  null));
            }

            doc.SetDataSource(pList);

            FormatHeader(doc);

            return(doc);
        }
        public ReportClass GetDetailListReport(OutputDeliveryList list,
                                               ClienteList clientes,
                                               ETipoAlbaranes tipo,
                                               DateTime fini,
                                               DateTime ffin)
        {
            if (list.Count == 0)
            {
                return(null);
            }

            AlbaranDetailListRpt doc = new AlbaranDetailListRpt();

            List <OutputDeliveryPrint>     pList     = new List <OutputDeliveryPrint>();
            List <OutputDeliveryLinePrint> conceptos = new List <OutputDeliveryLinePrint>();

            foreach (OutputDeliveryInfo item in list)
            {
                pList.Add(OutputDeliveryPrint.New(item,
                                                  clientes.GetItem(item.OidHolder),
                                                  null));

                foreach (OutputDeliveryLineInfo cp in item.Conceptos)
                {
                    conceptos.Add(OutputDeliveryLinePrint.New(cp));
                }
            }

            doc.SetDataSource(pList);
            doc.Subreports["Conceptos"].SetDataSource(conceptos);
            doc.SetParameterValue("Empresa", Schema.Name);
            doc.SetParameterValue("Tipo", tipo.ToString());
            doc.SetParameterValue("FIni", fini);
            doc.SetParameterValue("FFin", ffin);

            return(doc);
        }