Esempio n. 1
0
        public WebEasilyReport()
        {
            headerItems = new ReportItemCollection(this);
            footerItems = new ReportItemCollection(this);

            fieldItems = new DataSourceItemCollection(this);
            dataSource = new WebDataSourceItemCollection(this);
            mailSetting = new MailConfig();
            format = new ReportFormat();
            parameters = new ParameterItemCollection();
            images = new ImageItemCollection();
            dbGateway = new DBGateway(this);
            serializer = new BinarySerialize();

            this.reportID = ComponentInfo.DefaultReportID + DateTime.Now.ToString("yyyyMMdd");
            this.reportName = "";

            fontConvert = new FontConverter();
            Visible = false;

            if (this.UIType == EasilyReportUIType.AspNet)
            {
                render = new AspNetRender(this);
            }
            else
            {
                render = new ExtJsRender(this);
            }
        }
Esempio n. 2
0
 internal void SetCollection(ReportItemCollection col)
 {
     collection = col;
 }
Esempio n. 3
0
 /// <summary>
 /// Create a new copy of collection
 /// </summary>
 /// <param name="iReport">the owner report</param>
 /// <returns>a new copy of collection</returns>
 public ReportItemCollection Copy(IReport ireport)
 {
     ReportItemCollection newCollection = new ReportItemCollection(ireport);
     foreach (ReportItem reportItem in this)
     {
         newCollection.Add(reportItem.Copy());
     }
     return newCollection;
 }
Esempio n. 4
0
        private List<List<object>> CreateItem(ReportItemCollection collection, Font font)
        {
            List<List<object>> lists = new List<List<object>>();
            List<object> list = null;

            try
            {
                for (int i = 0; i < collection.Count; i++)
                {
                    if (i == 0 || collection[i].NewLine)
                    {
                        list = new List<object>();
                    }

                    list.Add(collection[i]);

                    if (!lists.Contains(list))
                    {
                        lists.Add(list);
                    }
                }

                if (collection.Count > 0)
                {
                    pdf.WriteItem(lists, font);
                }
            }
            catch (Exception ex)
            {
                ThrowException(ex);
            }
            return lists;
        }