|
|
|
@ -130,7 +130,7 @@ namespace ICSharpCode.Reporting.Test.DataSource
@@ -130,7 +130,7 @@ namespace ICSharpCode.Reporting.Test.DataSource
|
|
|
|
|
int i = 0; |
|
|
|
|
foreach (var element in collectionSource.SortedList) { |
|
|
|
|
collectionSource.Fill(ric,element); |
|
|
|
|
Console.WriteLine("first : <{0}> Last <{1}> ",((BaseDataItem)ric[0]).DBValue,((BaseDataItem)ric[1]).DBValue); |
|
|
|
|
// Console.WriteLine("first : <{0}> Last <{1}> ",((BaseDataItem)ric[0]).DBValue,((BaseDataItem)ric[1]).DBValue);
|
|
|
|
|
|
|
|
|
|
Assert.That(((BaseDataItem)ric[0]).DBValue,Is.GreaterThanOrEqualTo(compare)); |
|
|
|
|
|
|
|
|
@ -158,8 +158,7 @@ namespace ICSharpCode.Reporting.Test.DataSource
@@ -158,8 +158,7 @@ namespace ICSharpCode.Reporting.Test.DataSource
|
|
|
|
|
var dataItemsCollection = CreateDataItems(); |
|
|
|
|
var reportsettings = new ReportSettings(); |
|
|
|
|
reportsettings.GroupColumnsCollection.Add( new GroupColumn("GroupItem",1,ListSortDirection.Ascending)); |
|
|
|
|
//repiortsettings.GroupColumnsCollection.Add( new GroupColumn("RandomInt",1,ListSortDirection.Ascending));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var collectionSource = new CollectionDataSource (list,reportsettings); |
|
|
|
|
collectionSource.Bind(); |
|
|
|
|
int i = 0; |
|
|
|
@ -168,10 +167,10 @@ namespace ICSharpCode.Reporting.Test.DataSource
@@ -168,10 +167,10 @@ namespace ICSharpCode.Reporting.Test.DataSource
|
|
|
|
|
Console.WriteLine("Key {0} ",element.Key); |
|
|
|
|
foreach (var l in element) { |
|
|
|
|
collectionSource.Fill(dataItemsCollection,l); |
|
|
|
|
Console.WriteLine("first : <{0}> Last <{1}> Group <{2}> Randomint <{3}>",((BaseDataItem)dataItemsCollection[0]).DBValue, |
|
|
|
|
((BaseDataItem)dataItemsCollection[1]).DBValue, |
|
|
|
|
((BaseDataItem)dataItemsCollection[2]).DBValue, |
|
|
|
|
((BaseDataItem)dataItemsCollection[3]).DBValue); |
|
|
|
|
// Console.WriteLine("first : <{0}> Last <{1}> Group <{2}> Randomint <{3}>",((BaseDataItem)dataItemsCollection[0]).DBValue,
|
|
|
|
|
// ((BaseDataItem)dataItemsCollection[1]).DBValue,
|
|
|
|
|
// ((BaseDataItem)dataItemsCollection[2]).DBValue,
|
|
|
|
|
// ((BaseDataItem)dataItemsCollection[3]).DBValue);
|
|
|
|
|
i++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -188,7 +187,30 @@ namespace ICSharpCode.Reporting.Test.DataSource
@@ -188,7 +187,30 @@ namespace ICSharpCode.Reporting.Test.DataSource
|
|
|
|
|
Assert.That(i,Is.EqualTo(collectionSource.Count)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
|
public void DataItemWithNoColumnNameHasErrorMessageInDbValue() { |
|
|
|
|
var baseRow = new BaseRowItem(); |
|
|
|
|
var dataItem = new BaseDataItem() { |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
baseRow.Items.Add(dataItem); |
|
|
|
|
|
|
|
|
|
var row = new System.Collections.Generic.List<IPrintableObject>(); |
|
|
|
|
row.Add(baseRow); |
|
|
|
|
var reportSettings = new ReportSettings(); |
|
|
|
|
var collectionSource = new CollectionDataSource (list,reportSettings); |
|
|
|
|
collectionSource.Bind(); |
|
|
|
|
foreach (var element in collectionSource.SortedList) { |
|
|
|
|
collectionSource.Fill(row,element); |
|
|
|
|
var r = (BaseRowItem)row[0]; |
|
|
|
|
foreach (var result in r.Items) { |
|
|
|
|
Assert.That(((BaseDataItem)result).DBValue.StartsWith("Missing"),Is.EqualTo(true)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
|
public void FillDataIncludedInRow() { |
|
|
|
|
|
|
|
|
@ -210,16 +232,6 @@ namespace ICSharpCode.Reporting.Test.DataSource
@@ -210,16 +232,6 @@ namespace ICSharpCode.Reporting.Test.DataSource
|
|
|
|
|
} |
|
|
|
|
i ++; |
|
|
|
|
} |
|
|
|
|
/* |
|
|
|
|
do { |
|
|
|
|
collectionSource.Fill(row); |
|
|
|
|
var r = (BaseRowItem)row[0]; |
|
|
|
|
foreach (var element in r.Items) { |
|
|
|
|
Assert.That(((BaseDataItem)element).DBValue,Is.Not.Empty); |
|
|
|
|
} |
|
|
|
|
i ++; |
|
|
|
|
}while (collectionSource.MoveNext()); |
|
|
|
|
*/ |
|
|
|
|
Assert.That(i,Is.EqualTo(collectionSource.Count)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -255,15 +267,6 @@ namespace ICSharpCode.Reporting.Test.DataSource
@@ -255,15 +267,6 @@ namespace ICSharpCode.Reporting.Test.DataSource
|
|
|
|
|
Assert.That(res.DBValue,Is.Not.Empty); |
|
|
|
|
i ++; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
do { |
|
|
|
|
collectionSource.Fill(row); |
|
|
|
|
var res = (BaseDataItem)row.Find(c => ((BaseDataItem)c).ColumnName == "GroupItem"); |
|
|
|
|
Assert.That(res.DBValue,Is.Not.Empty); |
|
|
|
|
i ++; |
|
|
|
|
}while (collectionSource.MoveNext()); |
|
|
|
|
*/ |
|
|
|
|
Assert.That(i,Is.EqualTo(collectionSource.Count)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|