|
|
|
|
@ -27,8 +27,7 @@ namespace ICSharpCode.Reporting.PageBuilder.Converter
@@ -27,8 +27,7 @@ namespace ICSharpCode.Reporting.PageBuilder.Converter
|
|
|
|
|
internal class DataContainerConverter:ContainerConverter |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private CollectionSource collectionSource; |
|
|
|
|
CollectionSource collectionSource; |
|
|
|
|
|
|
|
|
|
public DataContainerConverter(Graphics graphics, IReportContainer reportContainer, |
|
|
|
|
Point currentLocation,CollectionSource collectionSource):base(graphics,reportContainer,currentLocation) |
|
|
|
|
@ -41,7 +40,7 @@ namespace ICSharpCode.Reporting.PageBuilder.Converter
@@ -41,7 +40,7 @@ namespace ICSharpCode.Reporting.PageBuilder.Converter
|
|
|
|
|
} |
|
|
|
|
this.collectionSource = collectionSource; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
public override IExportContainer Convert(){ |
|
|
|
|
if (collectionSource.Count == 0) { |
|
|
|
|
return base.Convert(); |
|
|
|
|
@ -51,40 +50,41 @@ namespace ICSharpCode.Reporting.PageBuilder.Converter
@@ -51,40 +50,41 @@ namespace ICSharpCode.Reporting.PageBuilder.Converter
|
|
|
|
|
Console.WriteLine(""); |
|
|
|
|
Console.WriteLine("start CurrentLocation {0}",CurrentLocation); |
|
|
|
|
var position = Point.Empty; |
|
|
|
|
do { |
|
|
|
|
collectionSource.Fill(Container.Items); |
|
|
|
|
// do {
|
|
|
|
|
// FitOnPage(position);
|
|
|
|
|
// collectionSource.Fill(Container.Items);
|
|
|
|
|
var itemsList = CreateConvertedList(exportContainer,position); |
|
|
|
|
exportContainer.ExportedItems.AddRange(itemsList); |
|
|
|
|
position = new Point(Container.Location.X,position.Y + Container.Size.Height); |
|
|
|
|
} |
|
|
|
|
while (collectionSource.MoveNext()); |
|
|
|
|
// }
|
|
|
|
|
// while (collectionSource.MoveNext());
|
|
|
|
|
Console.WriteLine("end CurrentLocation {0}",CurrentLocation); |
|
|
|
|
Console.WriteLine(""); |
|
|
|
|
ArrangeContainer(exportContainer); |
|
|
|
|
return exportContainer; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
/* |
|
|
|
|
public override IExportContainer Convert(){ |
|
|
|
|
if (collectionSource.Count == 0) { |
|
|
|
|
return base.Convert(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public IExportContainer aaaConvert(List<IPrintableObject>list,Point position){ |
|
|
|
|
var exportContainer = CreateExportContainer(); |
|
|
|
|
Console.WriteLine(""); |
|
|
|
|
Console.WriteLine("start CurrentLocation {0}",CurrentLocation); |
|
|
|
|
do { |
|
|
|
|
collectionSource.Fill(Container.Items); |
|
|
|
|
Console.WriteLine(((BaseDataItem)Container.Items[0]).DBValue); |
|
|
|
|
var itemsList = CreateConvertedList(exportContainer); |
|
|
|
|
var itemsList = CreateConvertedList(exportContainer,position); |
|
|
|
|
exportContainer.ExportedItems.AddRange(itemsList); |
|
|
|
|
} |
|
|
|
|
while (collectionSource.MoveNext()); |
|
|
|
|
Console.WriteLine("end CurrentLocation {0}",CurrentLocation); |
|
|
|
|
Console.WriteLine(""); |
|
|
|
|
ArrangeContainer(exportContainer); |
|
|
|
|
return exportContainer; |
|
|
|
|
return exportContainer; |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
public List<IExportColumn> Convert(ExportContainer container,Point position){ |
|
|
|
|
Console.WriteLine(""); |
|
|
|
|
Console.WriteLine("start CurrentLocation {0}",CurrentLocation); |
|
|
|
|
var itemsList = CreateConvertedList(container,position); |
|
|
|
|
Console.WriteLine("end CurrentLocation {0}",CurrentLocation); |
|
|
|
|
Console.WriteLine(""); |
|
|
|
|
return itemsList; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|