Browse Source

small cleanup

pull/15/head^2
Peter Forstmeier 15 years ago
parent
commit
60e4311f14
  1. 23
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/DataManager/ListStrategy/CollectionStrategy.cs
  2. 2
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/SimpleExpressionEvaluator/Compilation/Functions/AggregateFunctions/AggregateFunction.cs
  3. 4
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Globals/GlobalLists.cs

23
src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/DataManager/ListStrategy/CollectionStrategy.cs

@ -288,27 +288,26 @@ namespace ICSharpCode.Reports.Core { @@ -288,27 +288,26 @@ namespace ICSharpCode.Reports.Core {
public override CurrentItemsCollection FillDataRow(int pos)
{
CurrentItemsCollection ci = new CurrentItemsCollection();
var current = CurrentFromPosition(pos);
if (current != null)
var obj = CurrentFromPosition(pos);
if (obj != null)
{
CurrentItem c = null;
CurrentItem currentItem = null;
foreach (PropertyDescriptor pd in this.listProperties)
{
c = new CurrentItem();
c.ColumnName = pd.Name;
c.DataType = pd.PropertyType;
currentItem = new CurrentItem();
currentItem.ColumnName = pd.Name;
currentItem.DataType = pd.PropertyType;
//var s = pd.GetValue(current);
var s = FollowPropertyPath(current,pd.Name);
if (s != null)
var propValue = FollowPropertyPath(obj,pd.Name);
if (propValue != null)
{
c.Value = s.ToString();
currentItem.Value = propValue.ToString();
}
else
{
c.Value = String.Empty;
currentItem.Value = String.Empty;
}
ci.Add(c);
ci.Add(currentItem);
}
}
return ci;

2
src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/SimpleExpressionEvaluator/Compilation/Functions/AggregateFunctions/AggregateFunction.cs

@ -118,7 +118,7 @@ namespace SimpleExpressionEvaluator.Compilation.Functions.AggregateFunctions @@ -118,7 +118,7 @@ namespace SimpleExpressionEvaluator.Compilation.Functions.AggregateFunctions
if (currentItem != null) {
object s1 = Convert.ToString(currentItem.Value.ToString(),CultureInfo.CurrentCulture);
Console.WriteLine("\tvalue = {0}", s1.ToString());
Console.WriteLine("\tSetup DataSource value = {0}", s1.ToString());
if (IsNumeric(s1)) {
list.Add(Convert.ToDouble(s1,System.Globalization.CultureInfo.CurrentCulture));
} else {

4
src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Globals/GlobalLists.cs

@ -105,8 +105,7 @@ namespace ICSharpCode.Reports.Core.Globals @@ -105,8 +105,7 @@ namespace ICSharpCode.Reports.Core.Globals
#endregion
/// </summary>
///
#region Zoom
public static string[] ZoomValues ()
@ -128,7 +127,6 @@ namespace ICSharpCode.Reports.Core.Globals @@ -128,7 +127,6 @@ namespace ICSharpCode.Reports.Core.Globals
"50%",
"25%"};
#endregion

Loading…
Cancel
Save