@ -22,7 +22,7 @@ namespace ICSharpCode.Reports.Core {
@@ -22,7 +22,7 @@ namespace ICSharpCode.Reports.Core {
private SectionBounds sectionBounds ;
private IDataNavigator dataNavigator ;
private IExpressionEvaluatorFacade expressionEvaluatorFacade ;
// private ISinglePage singlePage;
private BaseSection startSection ;
private ILayouter layouter ;
@ -86,14 +86,13 @@ namespace ICSharpCode.Reports.Core {
@@ -86,14 +86,13 @@ namespace ICSharpCode.Reports.Core {
}
//
Point saveLocation = this . Location ;
Point currentPosition = new Point ( this . SectionBounds . DetailStart . X , rpea . LocationAfterDraw . Y ) ;
// Point currentPosition = new Point(this.SectionBounds.DetailStart.X,rpea.LocationAfterDraw.Y);
Point currentPosition = new Point ( this . startSection . Location . X , rpea . LocationAfterDraw . Y ) ;
Point tableStart = currentPosition ;
base . Render ( rpea ) ;
int defaultLeftPos = PrintHelper . DrawingAreaRelativeToParent ( this . Parent , this ) . Left ;
this . Items . SortByLocation ( ) ;
rpea . SinglePage . StartRow = this . dataNavigator . CurrentRow ;
foreach ( BaseRowItem row in this . items )
{
if ( row ! = null )
@ -101,22 +100,21 @@ namespace ICSharpCode.Reports.Core {
@@ -101,22 +100,21 @@ namespace ICSharpCode.Reports.Core {
row . Parent = this ;
if ( PrintHelper . IsTextOnlyRow ( row ) )
{
currentPosition = this . PrintRow ( rpea , row , currentPosition , defaultLeftPos ) ;
currentPosition = this . PrintText Row ( rpea , row , defaultLeftPos , currentPosition ) ;
this . Location = saveLocation ;
}
else {
do {
if ( AbstractRender er. IsPageFull ( new Rectangle ( currentPosition , row . Size ) , sectionBounds ) ) {
if ( PrintHelp er. IsPageFull ( new Rectangle ( currentPosition , row . Size ) , sectionBounds ) ) {
this . Location = saveLocation ;
rpea . SinglePage . EndRow = this . dataNavigator . CurrentRow ;
AbstractRenderer . PageBreak ( rpea ) ;
return ;
}
currentPosition = this . PrintRow ( rpea , row , currentPosition , defaultLeftPos ) ;
currentPosition = this . PrintDataRow ( rpea , row , defaultLeftPos , currentPosition ) ;
}
while ( this . dataNavigator . MoveNext ( ) ) ;
this . dataNavigator . Reset ( ) ;
this . dataNavigator . MoveNext ( ) ;
}
}
}
@ -131,28 +129,30 @@ namespace ICSharpCode.Reports.Core {
@@ -131,28 +129,30 @@ namespace ICSharpCode.Reports.Core {
}
private Point PrintRow ( ReportPageEventArgs rpea , BaseRowItem row , Point drawAt , int leftX )
private Point PrintText Row ( ReportPageEventArgs rpea , BaseRowItem row , int left , Point currentPos )
{
int extend = row . Size . Height - row . Items [ 0 ] . Size . Height ;
Rectangle saveRec = new Rectangle ( row . Location , row . Size ) ;
row . Location = new Point ( leftX , drawAt . Y ) ;
this . dataNavigator . Fill ( row . Items ) ;
row . Location = new Point ( left , currentPos . Y ) ;
EvaluateRecursive ( this . expressionEvaluatorFacade , row . Items ) ;
PrintHelper . SetLayoutForRow ( rpea . PrintPageEventArgs . Graphics , layouter , row ) ;
row . Render ( rpea ) ;
Point retVal = new Point ( leftX , drawAt . Y + row . Size . Height + 1 0 ) ;
Point retVal = new Point ( left , currentPos . Y + row . Size . Height + 1 0 ) ;
//reset values
row . Size = new Size ( saveRec . Size . Width , saveRec . Size . Height ) ;
row . Location = saveRec . Location ;
return retVal ;
}
private Point PrintDataRow ( ReportPageEventArgs rpea , BaseRowItem row , int left , Point currentPos )
{
this . dataNavigator . Fill ( row . Items ) ;
return this . PrintTextRow ( rpea , row , left , currentPos ) ;
}
public override string ToString ( ) {
return this . GetType ( ) . Name ;
}
@ -166,6 +166,13 @@ namespace ICSharpCode.Reports.Core {
@@ -166,6 +166,13 @@ namespace ICSharpCode.Reports.Core {
#region Interface implementation of 'ITableContainer'
public void StartLayoutAt ( BaseSection section )
{
if ( section = = null ) {
throw new ArgumentNullException ( "section" ) ;
}
this . startSection = section ;
}
public void RenderTable ( BaseReportItem parent , SectionBounds sectionBounds , ReportPageEventArgs rpea , ILayouter layouter )
{