Example #1
0
        public InformeRpt GetDetailReport(InformeInfo item)
        {
            if (item == null)
            {
                return(null);
            }

            InformeRpt doc = new InformeRpt();

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

            pList.Add(InformePrint.New(item));
            doc.SetDataSource(pList);
            doc.SetParameterValue("Empresa", Schema.Name);


            List <LineaInformePrint> pLineaInformes = new List <LineaInformePrint>();

            foreach (LineaInformeInfo child in item.LineaInformes)
            {
                pLineaInformes.Add(LineaInformePrint.New(child));
            }

            doc.Subreports["LineaInformeSubRpt"].SetDataSource(pLineaInformes);


            //FormatReport(doc, empresa.Logo);

            return(doc);
        }
Example #2
0
        public InformeListRpt GetListReport(InformeList list)
        {
            if (list.Count == 0)
            {
                return(null);
            }

            InformeListRpt doc = new ClienteListRpt();

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

            foreach (InformeInfo item in list)
            {
                pList.Add(InformePrint.New(item));;
            }

            doc.SetDataSource(pList);

            FormatHeader(doc);

            return(doc);
        }