Пример #1
0
		///<summary>Adds the specified section to the collection, but not to the end.  Instead, it inserts it exactly where it belongs based on the type.  The order cannot be changed by the user. Returns the index at which the section has been added, or -1 if not allowed because it already exists.</summary>
		public int Add(Section value){
			//if(value.Kind==AreaSectionKind.GroupHeader);
			//if(value.Kind==AreaSectionKind.GroupFooter);
			if(List.Count==0){
				List.Add(value);
				return 0;
			}
			for(int i=0;i<List.Count;i++){
				//we are trying to find the item to insert before
				if(i==List.Count-1){//if last item in list, then only option is to add to end of list
					List.Insert(i,value);
					return i;
				}
				if((int)value.Kind < (int)((Section)List[i]).Kind){
					List.Insert(i,value);
					return i;
				}
			}
			return -1;
		}
Пример #2
0
		///<summary>Prints sections inside a QueryObject</summary>
		private void PrintQueryObjectSection(QueryObject queryObj,Graphics g,Section section,int xPos,int yPos) {
			section.Height=0;
			ReportObject textObject;
			ReportObject fieldObject;
			ReportObject lineObject;
			ReportObject boxObject;
			string rawText="";//the raw text for a given field as taken from the database
			string displayText="";//The formatted text to print
			string prevDisplayText="";//The formatted text of the previous row. Used to test suppress dupl.	
			StringFormat strFormat;//used each time text is drawn to handle alignment issues
			int yPosAdd=0;
			if(queryObj.SuppressIfDuplicate
				&& section.Kind==AreaSectionKind.GroupTitle && rowsPrinted>0) 
			{
				return;//Only print the group title for each query object once.
			}
			//loop through each row in the table and make sure that the row can fit.  If it can fit, print it.  Otherwise go to next page.
			for(int i=rowsPrinted;i<queryObj.ReportTable.Rows.Count;i++) {
				//Figure out the current row height
				if(section.Name=="Detail" && queryObj.RowHeightValues[i]>_heightRemaining) {
					_heightRemaining=0;
					return;
				}
				//Find the Group Header height to see if printing at least one row is possible.
				if(section.Name=="Group Title") {
					int titleHeight=0;
					int headerHeight=0;
					foreach(ReportObject reportObject in queryObj.ReportObjects) {
						if(reportObject.SectionName=="Group Title") {
							titleHeight+=reportObject.Size.Height;
						}
						else if(reportObject.SectionName=="Group Header" && reportObject.Size.Height>headerHeight) {
							headerHeight=reportObject.Size.Height;
						}
					}
					//This is a new table and we want to know if we can print the first row
					if(titleHeight+headerHeight+queryObj.RowHeightValues[0]>_heightRemaining) {
						_heightRemaining=0;
						return;
					}
				}
				//Find the Group Footer height to see if printing the last row should happen on another page.
				if(section.Name=="Detail" && rowsPrinted==queryObj.ReportTable.Rows.Count-1) {
					int groupFooterHeight=0;
					foreach(ReportObject reportObject in queryObj.ReportObjects) {
						if(reportObject.SectionName=="Group Footer" && reportObject.Name.Contains("GroupSummaryText")) {
							groupFooterHeight+=reportObject.Size.Height+reportObject.OffSetY;
						}
						if(reportObject.SectionName=="Group Footer" && reportObject.Name.Contains("GroupSummaryLabel") 
							&& (reportObject.SummaryOrientation==SummaryOrientation.North || reportObject.SummaryOrientation==SummaryOrientation.South)) {
							groupFooterHeight+=reportObject.Size.Height;
						}
					}
					//See if we can print the Group Footer and the Last row
					if(groupFooterHeight+queryObj.RowHeightValues[queryObj.ReportTable.Rows.Count-1]>_heightRemaining) {
						_heightRemaining=0;
						return;
					}
				}
				int greatestObjectHeight=0;
				int groupTitleHeight=0;
				//Now figure out if anything in the header, footer, or title sections can still fit on the page
				foreach(ReportObject reportObject in queryObj.ReportObjects) {
					if(reportObject.SectionName!=section.Name) {
						continue;
					}
					if(reportObject.Size.Height>_heightRemaining) {
						_heightRemaining=0;
						return;
					}
					if(reportObject.SectionName=="Group Footer" && reportObject.Name.Contains("GroupSummary")) {
						if(!queryObj.IsLastSplit) {
							continue;
						}
						if(reportObject.Name.Contains("GroupSummaryLabel")) {
							yPos+=reportObject.OffSetY;
						}
						if(reportObject.Name.Contains("GroupSummaryText")) {
							if(reportObject.SummaryOperation==SummaryOperation.Sum) {
								reportObject.StaticText=GetGroupSummaryValue(reportObject.DataField,reportObject.SummaryGroups,reportObject.SummaryOperation).ToString("c");
							}
							else if(reportObject.SummaryOperation==SummaryOperation.Count) {
								reportObject.StaticText=GetGroupSummaryValue(reportObject.DataField,reportObject.SummaryGroups,reportObject.SummaryOperation).ToString();
							}
							int width=(int)g.MeasureString(reportObject.StaticText,reportObject.Font).Width+2;
							int height=(int)g.MeasureString(reportObject.StaticText,reportObject.Font).Height+2;
							if(width<queryObj.GetObjectByName(reportObject.SummarizedField+"Header").Size.Width) {
								width=queryObj.GetObjectByName(reportObject.SummarizedField+"Header").Size.Width;
							}
							reportObject.Size=new Size(width,height);
						}
					}
					if(section.Name=="Group Title" && rowsPrinted>0 && reportObject.Name=="Initial Group Title") {
						continue;
					}
					if(section.Name=="Group Footer" && reportObject.SummaryOrientation==SummaryOrientation.South) {
						ReportObject summaryField=queryObj.GetObjectByName(reportObject.DataField+"Footer");
						yPos+=summaryField.Size.Height;
					}
					if(reportObject.ReportObjectKind==ReportObjectKind.TextObject) {
						textObject=reportObject;
						strFormat=ReportObject.GetStringFormatAlignment(textObject.ContentAlignment);
						RectangleF layoutRect=new RectangleF(xPos+textObject.Location.X+textObject.OffSetX
							,yPos+textObject.Location.Y+textObject.OffSetY
							,textObject.Size.Width,textObject.Size.Height);
						if(textObject.IsUnderlined) {
							g.DrawString(textObject.StaticText,new Font(textObject.Font.FontFamily,textObject.Font.Size,textObject.Font.Style|FontStyle.Underline),Brushes.Black,layoutRect,strFormat);
						}
						else {
							g.DrawString(textObject.StaticText,textObject.Font,Brushes.Black,layoutRect,strFormat);
						}
						if(greatestObjectHeight<textObject.Size.Height) {
							greatestObjectHeight=textObject.Size.Height;
						}
						groupTitleHeight+=textObject.Size.Height;
						if(section.Name=="Group Title") {
							yPos+=textObject.Size.Height;
						}
						if(section.Name=="Group Footer" 
							&& ((reportObject.SummaryOrientation==SummaryOrientation.North || reportObject.SummaryOrientation==SummaryOrientation.South)
								|| (reportObject.Name.Contains("GroupSummaryText")))) 
						{
							yPosAdd+=textObject.Size.Height;
							yPos+=textObject.Size.Height;
						}
					}
					else if(reportObject.ReportObjectKind==ReportObjectKind.BoxObject) {
						boxObject=reportObject;
						int x1=xPos+boxObject.OffSetX;
						int x2=xPos-boxObject.OffSetX;
						int y1=yPos+boxObject.OffSetY;
						int y2=yPos-boxObject.OffSetY;
						int maxHorizontalLength=1100;
						if(!MyReport.IsLandscape) {
							maxHorizontalLength=850;
						}
						x2+=maxHorizontalLength;
						y2+=queryObj.GetSectionHeight(boxObject.SectionName);
						g.DrawRectangle(new Pen(boxObject.ForeColor,boxObject.FloatLineThickness),x1,y1,x2-x1,y2-y1);
						if(greatestObjectHeight<boxObject.Size.Height) {
							greatestObjectHeight=boxObject.Size.Height;
						}
						groupTitleHeight+=boxObject.Size.Height;
					}
					else if(reportObject.ReportObjectKind==ReportObjectKind.LineObject) {
						lineObject=reportObject;
						int length;
						int x=lineObject.OffSetX;
						int y=yPos+lineObject.OffSetY;
						int maxHorizontalLength=1100;
						if(!MyReport.IsLandscape) {
							maxHorizontalLength=850;
						}
						if(lineObject.LineOrientation==LineOrientation.Horizontal) {
							length=maxHorizontalLength*lineObject.IntLinePercent/100;
							if(lineObject.LinePosition==LinePosition.Bottom) {
								y+=queryObj.GetSectionHeight(lineObject.SectionName);
							}
							else if(lineObject.LinePosition==LinePosition.Top) {
								//Do Nothing Here
							}
							else if(lineObject.LinePosition==LinePosition.Center) {
								y+=(queryObj.GetSectionHeight(lineObject.SectionName)/2);
							}
							else {
								continue;
							}
							x+=(maxHorizontalLength/2)-(length/2);
							g.DrawLine(new Pen(reportObject.ForeColor,reportObject.FloatLineThickness),x,y,x+length,y);
						}
						else if(lineObject.LineOrientation==LineOrientation.Vertical) {
							length=queryObj.GetSectionHeight(lineObject.SectionName)*lineObject.IntLinePercent/100;
							if(lineObject.LinePosition==LinePosition.Left) {
								//Do Nothing Here
							}
							else if(lineObject.LinePosition==LinePosition.Right) {
								x+=maxHorizontalLength;
							}
							else if(lineObject.LinePosition==LinePosition.Center) {
								x+=maxHorizontalLength/2;
							}
							else {
								continue;
							}
							y+=(queryObj.GetSectionHeight(lineObject.SectionName)/2)-(length/2);
							g.DrawLine(new Pen(reportObject.ForeColor,reportObject.FloatLineThickness),x,y,x,y+length);
						}
						if(greatestObjectHeight<lineObject.Size.Height) {
							greatestObjectHeight=lineObject.Size.Height;
						}
						groupTitleHeight+=lineObject.Size.Height;
					}
					else if(reportObject.ReportObjectKind==ReportObjectKind.FieldObject) {
						fieldObject=reportObject;
						RectangleF layoutRect;
						strFormat=ReportObject.GetStringFormatAlignment(fieldObject.ContentAlignment);
						if(fieldObject.FieldDefKind==FieldDefKind.DataTableField) {
							layoutRect=new RectangleF(xPos+fieldObject.Location.X,yPos+fieldObject.Location.Y,fieldObject.Size.Width,queryObj.RowHeightValues[i]);
							if(MyReport.HasGridLines()) {
								g.DrawRectangle(new Pen(Brushes.LightGray),Rectangle.Round(layoutRect));
							}
							rawText=queryObj.ReportTable.Rows
								[i][queryObj.ArrDataFields.IndexOf(fieldObject.DataField)].ToString();
							displayText=rawText;
							List<string> listString=GetDisplayString(displayText,prevDisplayText,fieldObject,i,queryObj);
							displayText=listString[0];
							prevDisplayText=listString[1];
							//suppress if duplicate:
							if(i>0 && fieldObject.SuppressIfDuplicate && displayText==prevDisplayText) {
								displayText="";
							}
						}
						else {
							layoutRect=new RectangleF(xPos+fieldObject.Location.X,yPos+fieldObject.Location.Y,fieldObject.Size.Width,fieldObject.Size.Height);
							displayText=fieldObject.GetSummaryValue(queryObj.ReportTable,queryObj.ArrDataFields.IndexOf(fieldObject.SummarizedField)).ToString(fieldObject.StringFormat);
						}
						g.DrawString(displayText,fieldObject.Font
						,new SolidBrush(fieldObject.ForeColor),new RectangleF(layoutRect.X+1,layoutRect.Y+1,layoutRect.Width-1,layoutRect.Height-1),strFormat);
						yPosAdd=(int)layoutRect.Height;
					}
				}
				if(section.Kind==AreaSectionKind.GroupFooter) {
					yPosAdd+=20;//Added to give a buffer between split tables.
					section.Height+=yPosAdd;
					_heightRemaining-=section.Height;
					yPos+=yPosAdd;
					break;
				}
				else if(section.Kind==AreaSectionKind.GroupTitle) {
					section.Height+=groupTitleHeight;
					_heightRemaining-=section.Height;
					break;
				}
				else if(section.Kind==AreaSectionKind.GroupHeader) {
					section.Height=greatestObjectHeight;
					_heightRemaining-=section.Height;
					break;
				}
				if(section.Kind==AreaSectionKind.Detail) {
					rowsPrinted++;
					yPos+=yPosAdd;
					_heightRemaining-=yPosAdd;
					section.Height+=yPosAdd;
				}
			}
			if(rowsPrinted==queryObj.ReportTable.Rows.Count) {
				rowsPrinted=0;
				queryObj.IsPrinted=true;
			}
		}
Пример #3
0
		///<summary>Prints some rows of the details section at the specified x and y position on the page.  The math to decide how many rows to print is done ahead of time.  The number of rows printed so far is kept global so that it can be used in calculating the layout of this section.</summary>
		private void PrintQuerySection(Graphics g,Section section,int xPos,int yPos) {
			section.Height=0;
			ReportObject textObject;
			ReportObject lineObject;
			ReportObject boxObject;
			QueryObject queryObject;
			StringFormat strFormat;//used each time text is drawn to handle alignment issues
			#region Lines And Boxes
			foreach(ReportObject reportObject in MyReport.ReportObjects) {
				if(reportObject.SectionName!=section.Name) {
					//skip any reportObjects that are not in this section
					continue;
				}

				if(reportObject.ReportObjectKind==ReportObjectKind.BoxObject) {
					boxObject=reportObject;
					int x1=xPos+boxObject.OffSetX;
					int x2=xPos-boxObject.OffSetX;
					int y1=yPos+boxObject.OffSetY;
					int y2=yPos-boxObject.OffSetY;
					int maxHorizontalLength=1100;
					if(!MyReport.IsLandscape) {
						maxHorizontalLength=850;
					}
					x2+=maxHorizontalLength-xPos;
					y2+=_heightRemaining*MyReport.GetSectionHeight(boxObject.SectionName);
					g.DrawRectangle(new Pen(boxObject.ForeColor,boxObject.FloatLineThickness),x1,y1,x2-x1,y2-y1);
				}
				else if(reportObject.ReportObjectKind==ReportObjectKind.LineObject) {
					lineObject=reportObject;
					int length;
					int x=lineObject.OffSetX;
					int y=yPos+lineObject.OffSetY;
					int maxHorizontalLength=1100;
					if(!MyReport.IsLandscape) {
						maxHorizontalLength=850;
					}
					if(lineObject.LineOrientation==LineOrientation.Horizontal) {
						length=maxHorizontalLength*lineObject.IntLinePercent/100;
						if(lineObject.LinePosition==LinePosition.Bottom) {
							y+=MyReport.GetSectionHeight(lineObject.SectionName);
						}
						else if(lineObject.LinePosition==LinePosition.Top) {
							//Do Nothing Here
						}
						else if(lineObject.LinePosition==LinePosition.Center) {
							y+=(MyReport.GetSectionHeight(lineObject.SectionName)/2);
						}
						else {
							continue;
						}
						x+=(maxHorizontalLength/2)-(length/2);
						g.DrawLine(new Pen(reportObject.ForeColor,reportObject.FloatLineThickness),x,y,x+length,y);
					}
					else if(lineObject.LineOrientation==LineOrientation.Vertical) {
						length=MyReport.GetSectionHeight(lineObject.SectionName)*lineObject.IntLinePercent/100;
						if(lineObject.LinePosition==LinePosition.Left) {
							//Do Nothing Here
						}
						else if(lineObject.LinePosition==LinePosition.Right) {
							x=maxHorizontalLength;
						}
						else if(lineObject.LinePosition==LinePosition.Center) {
							x=maxHorizontalLength/2;
						}
						else {
							continue;
						}
						y=y+(MyReport.GetSectionHeight(lineObject.SectionName)/2)-(length/2);
						g.DrawLine(new Pen(reportObject.ForeColor,reportObject.FloatLineThickness),x,y,x,y+length);
					}
					else {
						//Do nothing since it has already been done for each row.
					}
				}
			}
			#endregion
			foreach(ReportObject reportObject in MyReport.ReportObjects) {
				if(reportObject.SectionName!=section.Name) {
					//skip any reportObjects that are not in this section
					continue;
				}
				if(reportObject.ReportObjectKind==ReportObjectKind.TextObject) {
					//not typical to print textobject in details section, but allowed
					textObject=reportObject;
					strFormat=ReportObject.GetStringFormatAlignment(textObject.ContentAlignment);
					RectangleF layoutRect=new RectangleF(xPos+textObject.Location.X
						,yPos+textObject.Location.Y
						,textObject.Size.Width,textObject.Size.Height);
					g.DrawString(textObject.StaticText,textObject.Font
						,new SolidBrush(textObject.ForeColor),layoutRect,strFormat);
					if(textObject.IsUnderlined) {
						g.DrawLine(new Pen(textObject.ForeColor),xPos+textObject.Location.X,yPos+textObject.Location.Y+textObject.Size.Height,xPos+textObject.Location.X+textObject.Size.Width,yPos+textObject.Location.Y+textObject.Size.Height);
					}
				}
				else if(reportObject.ReportObjectKind==ReportObjectKind.QueryObject) {
					queryObject=(QueryObject)reportObject;
					if(queryObject.IsPrinted==true) {
						continue;
					}
					if(queryObject.IsCentered) {
						if(MyReport.IsLandscape) {
							xPos=1100/2-(queryObject.QueryWidth/2);
						}
						else {
							xPos=850/2-(queryObject.QueryWidth/2);
						}
					}
					if(_heightRemaining>0) {
						PrintQueryObjectSection(queryObject,g,queryObject.Sections["Group Title"],xPos,yPos);
						yPos+=queryObject.Sections["Group Title"].Height;
						section.Height+=queryObject.Sections["Group Title"].Height;
					}
					if(_heightRemaining>0) {
						PrintQueryObjectSection(queryObject,g,queryObject.Sections["Group Header"],xPos,yPos);
						yPos+=queryObject.Sections["Group Header"].Height;
						section.Height+=queryObject.Sections["Group Header"].Height;
					}
					if(_heightRemaining>0) {
						PrintQueryObjectSection(queryObject,g,queryObject.Sections["Detail"],xPos,yPos);
						yPos+=queryObject.Sections["Detail"].Height;
						section.Height+=queryObject.Sections["Detail"].Height;
					}
					if(_heightRemaining>0) {
						PrintQueryObjectSection(queryObject,g,queryObject.Sections["Group Footer"],xPos,yPos);
						yPos+=queryObject.Sections["Group Footer"].Height;
						section.Height+=queryObject.Sections["Group Footer"].Height;
					}
					if(_heightRemaining<=0) {
						return;
					}
				}
			}
		}
Пример #4
0
		///<summary>Prints one section other than details at the specified x and y position on the page.  The math to decide whether it will fit on the current page is done ahead of time.</summary>
		private void PrintSection(Graphics g,Section section,int xPos,int yPos){
			ReportObject textObject;
			ReportObject fieldObject;
			ReportObject lineObject;
			ReportObject boxObject;
			StringFormat strFormat;//used each time text is drawn to handle alignment issues
			string displayText="";//The formatted text to print
			foreach(ReportObject reportObject in MyReport.ReportObjects){
				if(reportObject.SectionName!=section.Name){
					continue;
				}
				if(reportObject.ReportObjectKind==ReportObjectKind.TextObject){
					textObject=reportObject;
					Font newFont=textObject.Font;
					strFormat=ReportObject.GetStringFormatAlignment(textObject.ContentAlignment);
					if(section.Name=="Report Footer") {
						if(textObject.Name=="ReportSummaryText") {
							xPos+=MyReport.ReportObjects["ReportSummaryLabel"].Size.Width;
							if(textObject.IsUnderlined) {
								newFont=new Font(textObject.Font.FontFamily,textObject.Font.Size,FontStyle.Bold|FontStyle.Underline);
							}
							else {
								newFont=new Font(textObject.Font.FontFamily,textObject.Font.Size,FontStyle.Bold);
							}
							SizeF size=g.MeasureString(textObject.StaticText,newFont);
							textObject.Size=new Size((int)size.Width+1,(int)size.Height+1);
						}
						strFormat=ReportObject.GetStringFormatAlignment(textObject.ContentAlignment);
						RectangleF layoutRect=new RectangleF(xPos+textObject.Location.X+textObject.OffSetX
							,yPos+textObject.Location.Y+textObject.OffSetY
							,textObject.Size.Width,textObject.Size.Height);
						if(textObject.IsUnderlined) {
							g.DrawString(textObject.StaticText,new Font(textObject.Font.FontFamily,textObject.Font.Size,textObject.Font.Style|FontStyle.Underline),Brushes.Black,layoutRect,strFormat);
						}
						else {
							g.DrawString(textObject.StaticText,newFont,Brushes.Black,layoutRect,strFormat);
							//g.DrawLine(new Pen(textObject.ForeColor),xPos+textObject.Location.X+textObject.OffSetX,yPos+textObject.Location.Y+textObject.OffSetY+textObject.Size.Height,xPos+textObject.Location.X+textObject.Size.Width,yPos+textObject.Location.Y+textObject.Size.Height);
						}
					}
					else {
						strFormat=ReportObject.GetStringFormatAlignment(textObject.ContentAlignment);
						RectangleF layoutRect=new RectangleF(xPos+textObject.Location.X
							,yPos+textObject.Location.Y
							,textObject.Size.Width,textObject.Size.Height);
						if(textObject.IsUnderlined) {
							g.DrawString(textObject.StaticText,new Font(textObject.Font.FontFamily,textObject.Font.Size,textObject.Font.Style|FontStyle.Underline),Brushes.Black,layoutRect,strFormat);
						}
						else {
							g.DrawString(textObject.StaticText,textObject.Font,Brushes.Black,layoutRect,strFormat);
						}
					}
				}
				else if(reportObject.ReportObjectKind==ReportObjectKind.FieldObject){
					fieldObject=reportObject;
					strFormat=ReportObject.GetStringFormatAlignment(fieldObject.ContentAlignment);
					RectangleF layoutRect=new RectangleF(xPos+fieldObject.Location.X
						,yPos+fieldObject.Location.Y
						,fieldObject.Size.Width,fieldObject.Size.Height);
					displayText="";
					if(fieldObject.FieldDefKind==FieldDefKind.SummaryField) {
						//displayText=fieldObject.GetSummaryValue
						//	(MyReport.ReportTables,MyReport.DataFields.IndexOf
						//	(fieldObject.SummarizedField))
						//	.ToString(fieldObject.FormatString);
					}
					else if(fieldObject.FieldDefKind==FieldDefKind.SpecialField){
						if(fieldObject.SpecialFieldType==SpecialFieldType.PageNofM){//not functional yet
							//displayText=Lan.g(this,"Page")+" "+(pagesPrinted+1).ToString()
							//	+Lan.g(
						}
						else if(fieldObject.SpecialFieldType==SpecialFieldType.PageNumber){
							displayText=Lan.g(this,"Page")+" "+(pagesPrinted+1).ToString();
						}
					}
					g.DrawString(displayText,fieldObject.Font,Brushes.Black,layoutRect,strFormat);
				}
				else if(reportObject.ReportObjectKind==ReportObjectKind.BoxObject) {
					boxObject=reportObject;
					int x1=xPos+boxObject.OffSetX;
					int x2=xPos-boxObject.OffSetX;
					int y1=yPos+boxObject.OffSetY;
					int y2=yPos-boxObject.OffSetY;
					int maxHorizontalLength=1100;
					if(!MyReport.IsLandscape) {
						maxHorizontalLength=850;
					}
					x2+=maxHorizontalLength;
					y2+=MyReport.GetSectionHeight(boxObject.SectionName);
					g.DrawRectangle(new Pen(boxObject.ForeColor,boxObject.FloatLineThickness),x1,y1,x2-x1,y2-y1);
				}
				else if(reportObject.ReportObjectKind==ReportObjectKind.LineObject) {
					lineObject=reportObject;
					int length;
					int x=lineObject.OffSetX;
					int y=yPos+lineObject.OffSetY;
					int maxHorizontalLength=1100;
					if(!MyReport.IsLandscape) {
						maxHorizontalLength=850;
					}
					if(lineObject.LineOrientation==LineOrientation.Horizontal) {
						length=maxHorizontalLength*lineObject.IntLinePercent/100;
						if(lineObject.LinePosition==LinePosition.Bottom) {
							y+=MyReport.GetSectionHeight(lineObject.SectionName);
						}
						else if(lineObject.LinePosition==LinePosition.Top) {
							//Do Nothing Here
						}
						else if(lineObject.LinePosition==LinePosition.Center) {
							y+=(MyReport.GetSectionHeight(lineObject.SectionName)/2);
						}
						else {
							continue;
						}
						x+=(maxHorizontalLength/2)-(length/2);
						g.DrawLine(new Pen(reportObject.ForeColor,reportObject.FloatLineThickness),x,y,x+length,y);
					}
					else if(lineObject.LineOrientation==LineOrientation.Vertical) {
						length=MyReport.GetSectionHeight(lineObject.SectionName)*lineObject.IntLinePercent/100;
						if(lineObject.LinePosition==LinePosition.Left) {
							//Do Nothing Here
						}
						else if(lineObject.LinePosition==LinePosition.Right) {
							x+=maxHorizontalLength;
						}
						else if(lineObject.LinePosition==LinePosition.Center) {
							x+=maxHorizontalLength/2;
						}
						else {
							continue;
						}
						y+=(MyReport.GetSectionHeight(lineObject.SectionName)/2)-(length/2);
						g.DrawLine(new Pen(reportObject.ForeColor,reportObject.FloatLineThickness),x,y,x,y+length);
					}
				}
			}
		}
Пример #5
0
		///<summary></summary>
		public int IndexOf(Section value){
			return(List.IndexOf(value));
		}