Example #1
0
		void BaseValues()
		{
			
//			this.UseStandardPrinter = true;
//			this.GraphicsUnit = GraphicsUnit.Pixel;
//			this.Padding = new Padding(5);
//			this.DefaultFont = GlobalValues.DefaultFont;
			ReportType = GlobalEnums.ReportType.FormSheet;
//			
			this.DataModel = GlobalEnums.PushPullModel.FormSheet;
//			
//			this.CommandType =  System.Data.CommandType.Text;
//			this.ConnectionString = String.Empty;
//			this.CommandText = String.Empty;
//			
			TopMargin = GlobalValues.DefaultPageMargin.Left;
			BottomMargin = GlobalValues.DefaultPageMargin.Bottom;
			LeftMargin = GlobalValues.DefaultPageMargin.Left;
			RightMargin = GlobalValues.DefaultPageMargin.Right;
//			
//			this.availableFields = new AvailableFieldsCollection();

			SortColumnsCollection = new SortColumnCollection();
			GroupColumnsCollection = new GroupColumnCollection();
//			this.sqlParameters = new SqlParameterCollection();
			ParameterCollection = new ParameterCollection();
//			this.NoDataMessage = "No Data for this Report";
		}
Example #2
0
        void BaseValues()
        {
//			this.UseStandardPrinter = true;
//			this.GraphicsUnit = GraphicsUnit.Pixel;
//			this.Padding = new Padding(5);
//			this.DefaultFont = GlobalValues.DefaultFont;
//			ReportType = ReportType.FormSheet;
//
            this.DataModel = PushPullModel.FormSheet;
//
//			this.CommandType =  System.Data.CommandType.Text;
//			this.ConnectionString = String.Empty;
//			this.CommandText = String.Empty;
//
            TopMargin    = GlobalValues.DefaultPageMargin.Left;
            BottomMargin = GlobalValues.DefaultPageMargin.Bottom;
            LeftMargin   = GlobalValues.DefaultPageMargin.Left;
            RightMargin  = GlobalValues.DefaultPageMargin.Right;
//
//			this.availableFields = new AvailableFieldsCollection();

            SortColumnsCollection  = new SortColumnCollection();
            GroupColumnsCollection = new GroupColumnCollection();
            ParameterCollection    = new ParameterCollection();
//			this.sqlParameters = new SqlParameterCollection();

//			this.NoDataMessage = "No Data for this Report";
        }
Example #3
0
		private IndexList BuildGroup (IndexList source,GroupColumnCollection groups)
		{
			string compareValue = String.Empty;
			var idlist = new IndexList();

			PropertyDescriptor[] groupProperties = BuildSortProperties (groups);

			GroupComparer groupComparer = null;
			
			foreach (BaseComparer element in source) {
				var groupValue = ExtractValue(element,groupProperties);
//				var query2 =  idlist.FirstOrDefault( s => ((GroupComparer)s).ObjectArray[0] == groupValue) as GroupComparer;
//				if (query2 == null) {
//					groupComparer = CreateGroupHeader(element);
//					idlist.Add(groupComparer);
//				} else {
//					Console.WriteLine("xx");
//				}
				if (compareValue != groupValue) {
					groupComparer = CreateGroupHeader(element);
					idlist.Add(groupComparer);
				}
				groupComparer.IndexList.Add(element);
				
				compareValue = groupValue;
			}
			ShowGrouping(ref idlist);
			return idlist;
		}
Example #4
0
		private Dictionary<string,IndexList> BuildGroup_1 (IndexList list,GroupColumnCollection groups) {
			var dictionary = new Dictionary<string,IndexList>();
			PropertyDescriptor[] groupProperties = BuildSortProperties (groups);
			foreach (var element in list) {
				string groupValue = ExtractValue (element,groupProperties);
				if (!dictionary.ContainsKey(groupValue)) {
					dictionary[groupValue] = new IndexList();
				}
				
				dictionary[groupValue].Add(element);
			}
			
			Console.WriteLine("Dictonary ");
			foreach (var el in dictionary.Values) {
				Console.WriteLine(el.Count.ToString());
				foreach (var element in el) {
					Console.WriteLine("-- {0}",element.ToString());
				}
			}
			return dictionary;
		}