|
|
|
@ -17,9 +17,8 @@ namespace ICSharpCode.Reports.Core.Exporter
@@ -17,9 +17,8 @@ namespace ICSharpCode.Reports.Core.Exporter
|
|
|
|
|
private ITableContainer baseTable; |
|
|
|
|
|
|
|
|
|
public TableConverter(IDataNavigator dataNavigator, |
|
|
|
|
ExporterPage singlePage, |
|
|
|
|
|
|
|
|
|
ILayouter layouter ):base(dataNavigator,singlePage,layouter) |
|
|
|
|
ExporterPage singlePage, ILayouter layouter ):base(dataNavigator,singlePage,layouter) |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -88,31 +87,107 @@ namespace ICSharpCode.Reports.Core.Exporter
@@ -88,31 +87,107 @@ namespace ICSharpCode.Reports.Core.Exporter
|
|
|
|
|
Rectangle pageBreakRect = PrintHelper.CalculatePageBreakRectangle((BaseReportItem)simpleContainer,currentPosition); |
|
|
|
|
|
|
|
|
|
if (PrintHelper.IsPageFull(pageBreakRect,base.SectionBounds)) |
|
|
|
|
{ |
|
|
|
|
{ |
|
|
|
|
base.BuildNewPage(mylist,section); |
|
|
|
|
|
|
|
|
|
currentPosition = BaseConverter.BaseConvert(mylist,headerContainer, |
|
|
|
|
defaultLeftPos, |
|
|
|
|
base.SectionBounds.ReportHeaderRectangle.Location); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
currentPosition = BaseConverter.BaseConvert(mylist,simpleContainer,defaultLeftPos,currentPosition); |
|
|
|
|
currentPosition = BaseConverter.BaseConvert(mylist,headerContainer, |
|
|
|
|
defaultLeftPos, |
|
|
|
|
base.SectionBounds.ReportHeaderRectangle.Location); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
currentPosition = BaseConverter.BaseConvert(mylist,simpleContainer,defaultLeftPos,currentPosition); |
|
|
|
|
|
|
|
|
|
simpleContainer.Size = base.RestoreSize; |
|
|
|
|
} |
|
|
|
|
while (base.DataNavigator.MoveNext()); |
|
|
|
|
//Allway's reset the DataNavigator
|
|
|
|
|
base.DataNavigator.Reset(); |
|
|
|
|
base.DataNavigator.MoveNext(); |
|
|
|
|
SectionBounds.ReportFooterRectangle = new Rectangle(SectionBounds.ReportFooterRectangle.Left, |
|
|
|
|
currentPosition.Y, |
|
|
|
|
SectionBounds.ReportFooterRectangle.Width, |
|
|
|
|
SectionBounds.ReportFooterRectangle.Height); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return mylist; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ExporterCollection old_ConvertInternal(ExporterCollection mylist) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
Point currentPosition = new Point(PrintHelper.DrawingAreaRelativeToParent(this.baseTable.Parent,this.baseTable).Location.X, |
|
|
|
|
base.SectionBounds.DetailStart.Y); |
|
|
|
|
|
|
|
|
|
int defaultLeftPos = currentPosition.X; |
|
|
|
|
|
|
|
|
|
Point dataAreaStart = new Point(baseTable.Items[0].Location.X,baseTable.Items[0].Location.Y + currentPosition.Y); |
|
|
|
|
|
|
|
|
|
ISimpleContainer headerContainer = null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.baseTable.Items.SortByLocation(); |
|
|
|
|
|
|
|
|
|
foreach (ISimpleContainer simpleContainer in this.baseTable.Items) |
|
|
|
|
{ |
|
|
|
|
if (simpleContainer.Items.Count > 0) { |
|
|
|
|
simpleContainer.Location = new Point (simpleContainer.Location.X,simpleContainer.Location.Y); |
|
|
|
|
simpleContainer.Parent = (BaseReportItem)this.baseTable; |
|
|
|
|
base.SaveSize( new Size (simpleContainer.Size.Width,simpleContainer.Size.Height)); |
|
|
|
|
// Header/FooterRow
|
|
|
|
|
|
|
|
|
|
if (PrintHelper.IsTextOnlyRow(simpleContainer) ) { |
|
|
|
|
headerContainer = simpleContainer; |
|
|
|
|
currentPosition = BaseConverter.BaseConvert(mylist,headerContainer,defaultLeftPos,currentPosition); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
// DataRegion
|
|
|
|
|
base.SaveSize(simpleContainer.Size); |
|
|
|
|
do { |
|
|
|
|
//
|
|
|
|
|
BaseSection section = this.baseTable.Parent as BaseSection; |
|
|
|
|
PrintHelper.AdjustSectionLocation(section); |
|
|
|
|
|
|
|
|
|
base.FillRow(simpleContainer); |
|
|
|
|
|
|
|
|
|
StandardPrinter.EvaluateRow(base.Evaluator,mylist); |
|
|
|
|
|
|
|
|
|
base.PrepareContainerForConverting(null,simpleContainer); |
|
|
|
|
|
|
|
|
|
Rectangle pageBreakRect = PrintHelper.CalculatePageBreakRectangle((BaseReportItem)simpleContainer,currentPosition); |
|
|
|
|
|
|
|
|
|
if (PrintHelper.IsPageFull(pageBreakRect,base.SectionBounds)) |
|
|
|
|
{ |
|
|
|
|
base.BuildNewPage(mylist,section); |
|
|
|
|
|
|
|
|
|
simpleContainer.Size = base.RestoreSize; |
|
|
|
|
currentPosition = BaseConverter.BaseConvert(mylist,headerContainer, |
|
|
|
|
defaultLeftPos, |
|
|
|
|
base.SectionBounds.ReportHeaderRectangle.Location); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
while (base.DataNavigator.MoveNext()); |
|
|
|
|
//Allway's reset the DataNavigator
|
|
|
|
|
base.DataNavigator.Reset(); |
|
|
|
|
base.DataNavigator.MoveNext(); |
|
|
|
|
SectionBounds.ReportFooterRectangle = new Rectangle(SectionBounds.ReportFooterRectangle.Left, |
|
|
|
|
currentPosition.Y, |
|
|
|
|
SectionBounds.ReportFooterRectangle.Width, |
|
|
|
|
SectionBounds.ReportFooterRectangle.Height); |
|
|
|
|
|
|
|
|
|
currentPosition = BaseConverter.BaseConvert(mylist,simpleContainer,defaultLeftPos,currentPosition); |
|
|
|
|
|
|
|
|
|
simpleContainer.Size = base.RestoreSize; |
|
|
|
|
} |
|
|
|
|
while (base.DataNavigator.MoveNext()); |
|
|
|
|
//Allway's reset the DataNavigator
|
|
|
|
|
base.DataNavigator.Reset(); |
|
|
|
|
base.DataNavigator.MoveNext(); |
|
|
|
|
SectionBounds.ReportFooterRectangle = new Rectangle(SectionBounds.ReportFooterRectangle.Left, |
|
|
|
|
currentPosition.Y, |
|
|
|
|
SectionBounds.ReportFooterRectangle.Width, |
|
|
|
|
SectionBounds.ReportFooterRectangle.Height); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return mylist; |
|
|
|
|
} |
|
|
|
|
return mylist; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|