|
|
|
@ -33,18 +33,32 @@ namespace ICSharpCode.Reports.Core.BaseClasses.Printing
@@ -33,18 +33,32 @@ namespace ICSharpCode.Reports.Core.BaseClasses.Printing
|
|
|
|
|
return Rectangle.Empty; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Console.WriteLine("layouter for container <{0}>",container.ToString()); |
|
|
|
|
|
|
|
|
|
Rectangle desiredContainerRectangle = new Rectangle (container.Location,container.Size); |
|
|
|
|
|
|
|
|
|
System.Collections.Generic.IEnumerable<BaseReportItem> canGrowShrinkCollection = from bt in container.Items where bt.CanGrow == true select bt; |
|
|
|
|
|
|
|
|
|
if (canGrowShrinkCollection.Count() > 0 ) { |
|
|
|
|
Rectangle surroundingRec = FindSurroundingRectangle(graphics,canGrowShrinkCollection); |
|
|
|
|
// desiredContainerRectangle = new Rectangle(container.Location.X,
|
|
|
|
|
// container.Location.Y,
|
|
|
|
|
// container.Size.Width,
|
|
|
|
|
// surroundingRec.Size.Height + GlobalValues.ControlMargins.Top + GlobalValues.ControlMargins.Bottom);
|
|
|
|
|
//
|
|
|
|
|
desiredContainerRectangle = new Rectangle(container.Location.X, |
|
|
|
|
container.Location.Y, |
|
|
|
|
container.Size.Width, |
|
|
|
|
surroundingRec.Size.Height + GlobalValues.ControlMargins.Top + GlobalValues.ControlMargins.Bottom); |
|
|
|
|
surroundingRec.Size.Height); |
|
|
|
|
|
|
|
|
|
// var r1 = new Rectangle(container.Location.X,
|
|
|
|
|
// container.Location.Y,
|
|
|
|
|
// container.Size.Width,
|
|
|
|
|
// surroundingRec.Size.Height);
|
|
|
|
|
//
|
|
|
|
|
// Console.WriteLine("Diff {0} - {1} dif {2}",desiredContainerRectangle,r1,desiredContainerRectangle.Height - r1.Height);
|
|
|
|
|
} |
|
|
|
|
Console.WriteLine(" Container : {0} - DesiredContainerRectangle {1} ",container.Size,desiredContainerRectangle.Size); |
|
|
|
|
return desiredContainerRectangle; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -58,7 +72,7 @@ namespace ICSharpCode.Reports.Core.BaseClasses.Printing
@@ -58,7 +72,7 @@ namespace ICSharpCode.Reports.Core.BaseClasses.Printing
|
|
|
|
|
throw new ArgumentNullException("section"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Console.WriteLine("layouter for {0}",section.Name); |
|
|
|
|
Console.WriteLine("layouter for section <{0}>",section.Name); |
|
|
|
|
|
|
|
|
|
IEnumerable<BaseReportItem> canGrowShrinkCollection = from bt in section.Items where bt.CanGrow == true select bt; |
|
|
|
|
|
|
|
|
@ -72,12 +86,18 @@ namespace ICSharpCode.Reports.Core.BaseClasses.Printing
@@ -72,12 +86,18 @@ namespace ICSharpCode.Reports.Core.BaseClasses.Printing
|
|
|
|
|
Rectangle surroundingRec = FindSurroundingRectangle(graphics,canGrowShrinkCollection); |
|
|
|
|
|
|
|
|
|
if (surroundingRec.Height > desiredSectionRectangle .Height) { |
|
|
|
|
// desiredSectionRectangle = new Rectangle(section.Location.X,
|
|
|
|
|
// section .Location.Y,
|
|
|
|
|
// section .Size.Width,
|
|
|
|
|
// surroundingRec.Size.Height + GlobalValues.ControlMargins.Top + GlobalValues.ControlMargins.Bottom );
|
|
|
|
|
|
|
|
|
|
desiredSectionRectangle = new Rectangle(section.Location.X, |
|
|
|
|
section .Location.Y, |
|
|
|
|
section .Size.Width, |
|
|
|
|
surroundingRec.Size.Height + GlobalValues.ControlMargins.Top + GlobalValues.ControlMargins.Bottom ); |
|
|
|
|
surroundingRec.Size.Height); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Console.WriteLine(" Section : {0} - DesiredContainerRectangle {1} ",section.Size,desiredSectionRectangle.Size); |
|
|
|
|
return desiredSectionRectangle; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|