Browse Source

Row - Fill Data

reports
Peter Forstmeier 12 years ago
parent
commit
b851a3e81f
  1. 25
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/DataManager/Listhandling/CollectionDataSource.cs

25
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/DataManager/Listhandling/CollectionDataSource.cs

@ -60,7 +60,7 @@ namespace ICSharpCode.Reporting.DataManager.Listhandling
throw new ArgumentNullException("reportSettings"); throw new ArgumentNullException("reportSettings");
baseList = CreateBaseList(list); baseList = CreateBaseList(list);
CurrentList = baseList; CurrentList = baseList;
this.elementType = elementType; this.elementType = elementType;
@ -91,7 +91,7 @@ namespace ICSharpCode.Reporting.DataManager.Listhandling
} }
} }
public object Current {get; private set;} public object Current {get; private set;}
@ -168,8 +168,21 @@ namespace ICSharpCode.Reporting.DataManager.Listhandling
public void Fill(List<IPrintableObject> collection) public void Fill(List<IPrintableObject> collection)
{ {
foreach (IPrintableObject item in collection) foreach (var element in collection) {
{ var container = element as ReportContainer;
if (container != null) {
FillFromList(container.Items);
} else {
//FillFromList(collection);
FillInternal(element);
}
}
}
void FillFromList(List<IPrintableObject> collection)
{
foreach (IPrintableObject item in collection) {
FillInternal(item); FillInternal(item);
} }
} }
@ -204,7 +217,7 @@ namespace ICSharpCode.Reporting.DataManager.Listhandling
public bool MoveNext() public bool MoveNext()
{ {
var canMove = listEnumerator.MoveNext(); var canMove = listEnumerator.MoveNext();
if (orderGroup == OrderGroup.Grouped) { if (orderGroup == OrderGroup.Grouped) {
if (! canMove) { if (! canMove) {
var groupCanMove = groupEnumerator.MoveNext(); var groupCanMove = groupEnumerator.MoveNext();
@ -212,7 +225,7 @@ namespace ICSharpCode.Reporting.DataManager.Listhandling
listEnumerator = groupEnumerator.Current.GetEnumerator(); listEnumerator = groupEnumerator.Current.GetEnumerator();
canMove = listEnumerator.MoveNext(); canMove = listEnumerator.MoveNext();
} }
} }
Current = listEnumerator.Current; Current = listEnumerator.Current;
return canMove; return canMove;
} }

Loading…
Cancel
Save