|
|
|
|
@ -55,6 +55,69 @@ namespace ICSharpCode.Reports.Core
@@ -55,6 +55,69 @@ namespace ICSharpCode.Reports.Core
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void RenderTable (BaseReportItem parent,ITableContainer tableContainer,ReportPageEventArgs rpea) |
|
|
|
|
{ |
|
|
|
|
if (rpea == null) { |
|
|
|
|
throw new ArgumentNullException("rpea"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Point saveLocation = tableContainer.Location; |
|
|
|
|
|
|
|
|
|
Point currentPosition = new Point(this.CurrentSection.Location.X,this.CurrentSection.Location.Y); |
|
|
|
|
|
|
|
|
|
Point tableStart = currentPosition; |
|
|
|
|
|
|
|
|
|
// base.Render(rpea);
|
|
|
|
|
|
|
|
|
|
int defaultLeftPos = PrintHelper.DrawingAreaRelativeToParent(parent,tableContainer).Left; |
|
|
|
|
|
|
|
|
|
tableContainer.Items.SortByLocation(); |
|
|
|
|
|
|
|
|
|
rpea.SinglePage.StartRow = this.dataNavigator.CurrentRow; |
|
|
|
|
foreach (BaseRowItem row in tableContainer.Items) |
|
|
|
|
{ |
|
|
|
|
if (row != null) |
|
|
|
|
{ |
|
|
|
|
row.Parent = tableContainer as BaseReportItem; |
|
|
|
|
if (PrintHelper.IsTextOnlyRow(row) ) |
|
|
|
|
{ |
|
|
|
|
// currentPosition = this.PrintTextRow (rpea,row,defaultLeftPos,currentPosition);
|
|
|
|
|
// currentPosition = this.RenderContainer(parent,tableContainer,rpea);
|
|
|
|
|
|
|
|
|
|
this.RenderContainer(parent,row,rpea); |
|
|
|
|
|
|
|
|
|
tableContainer.Location = saveLocation; |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
do { |
|
|
|
|
if (PrintHelper.IsPageFull(new Rectangle(currentPosition,row.Size),this.SectionBounds)) { |
|
|
|
|
tableContainer.Location = saveLocation; |
|
|
|
|
|
|
|
|
|
rpea.SinglePage.EndRow = this.dataNavigator.CurrentRow; |
|
|
|
|
AbstractRenderer.PageBreak(rpea); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// currentPosition = this.PrintDataRow (rpea,row,defaultLeftPos,currentPosition);
|
|
|
|
|
} |
|
|
|
|
while (this.dataNavigator.MoveNext()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/* |
|
|
|
|
if (this.DrawBorder) { |
|
|
|
|
Border border = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1)); |
|
|
|
|
border.DrawBorder(rpea.PrintPageEventArgs.Graphics, |
|
|
|
|
new Rectangle(parent.Location.X,tableStart.Y, |
|
|
|
|
parent.Size.Width,currentPosition.Y + 5)); |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X,rpea.LocationAfterDraw.Y + 20); |
|
|
|
|
// base.NotifyAfterPrint (rpea.LocationAfterDraw);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected Point RenderItems (ReportPageEventArgs rpea) |
|
|
|
|
{ |
|
|
|
|
base.SinglePage.IDataNavigator = this.dataNavigator; |
|
|
|
|
@ -70,7 +133,7 @@ namespace ICSharpCode.Reports.Core
@@ -70,7 +133,7 @@ namespace ICSharpCode.Reports.Core
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (hasContainer) { |
|
|
|
|
return RenderSimpleContainer(this.CurrentSection,container,rpea); |
|
|
|
|
return RenderSectionWithSimpleContainer(this.CurrentSection,container,rpea); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
return base.RenderSection(rpea); |
|
|
|
|
@ -80,10 +143,10 @@ namespace ICSharpCode.Reports.Core
@@ -80,10 +143,10 @@ namespace ICSharpCode.Reports.Core
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Point RenderSimpleContainer (BaseSection section, |
|
|
|
|
private Point RenderSectionWithSimpleContainer (BaseSection section, |
|
|
|
|
ISimpleContainer container, |
|
|
|
|
ReportPageEventArgs rpea) |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
Point drawPoint = Point.Empty; |
|
|
|
|
if (section.Visible){ |
|
|
|
|
@ -113,12 +176,13 @@ namespace ICSharpCode.Reports.Core
@@ -113,12 +176,13 @@ namespace ICSharpCode.Reports.Core
|
|
|
|
|
|
|
|
|
|
ISimpleContainer cont = item as ISimpleContainer; |
|
|
|
|
|
|
|
|
|
RenderChilds (this.CurrentSection,cont,rpea); |
|
|
|
|
RenderContainer (this.CurrentSection,cont,rpea); |
|
|
|
|
|
|
|
|
|
item.Location = saveLocation; |
|
|
|
|
|
|
|
|
|
drawPoint = new Point(item.Location.X, |
|
|
|
|
section.SectionOffset + section.Size.Height); |
|
|
|
|
|
|
|
|
|
rpea.LocationAfterDraw = new Point (rpea.LocationAfterDraw.X,section.SectionOffset + section.Size.Height); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
@ -135,43 +199,19 @@ namespace ICSharpCode.Reports.Core
@@ -135,43 +199,19 @@ namespace ICSharpCode.Reports.Core
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void RenderChilds (BaseReportItem parent,ISimpleContainer simpleContainer,ReportPageEventArgs rpea) |
|
|
|
|
private void RenderContainer (BaseReportItem parent,ISimpleContainer simpleContainer,ReportPageEventArgs rpea) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
if (simpleContainer != null) { |
|
|
|
|
|
|
|
|
|
BaseReportItem item = simpleContainer as BaseReportItem; |
|
|
|
|
|
|
|
|
|
if ((simpleContainer.Items != null) && (simpleContainer.Items.Count > 0)) { |
|
|
|
|
if (simpleContainer.Items != null) { |
|
|
|
|
|
|
|
|
|
base.RenderPlainCollection(item,simpleContainer.Items,new Point(parent.Location.X + simpleContainer.Location.X, |
|
|
|
|
item.SectionOffset + item.Location.Y),rpea); |
|
|
|
|
|
|
|
|
|
foreach (BaseReportItem child in simpleContainer.Items) { |
|
|
|
|
child.Parent = item; |
|
|
|
|
|
|
|
|
|
Point saveLocation = new Point (child.Location.X,child.Location.Y); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
child.Location = new Point(parent.Location.X + simpleContainer.Location.X + child.Location.X, |
|
|
|
|
item.SectionOffset + item.Location.Y + child.Location.Y); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (item.BackColor != GlobalValues.DefaultBackColor) { |
|
|
|
|
child.BackColor = item.BackColor; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BaseTextItem textItem = child as BaseTextItem; |
|
|
|
|
|
|
|
|
|
if (textItem != null) { |
|
|
|
|
string str = textItem.Text; |
|
|
|
|
textItem.Text = Evaluator.Evaluate(textItem.Text); |
|
|
|
|
textItem.Render(rpea); |
|
|
|
|
textItem.Text = str; |
|
|
|
|
} else { |
|
|
|
|
child.Render (rpea); |
|
|
|
|
} |
|
|
|
|
child.Location = saveLocation; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|