Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 21 files changed
  • 0 commit comments
  • 1 contributor
Showing with 91 additions and 140 deletions.
  1. +6 −0 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/ContainerItemDesigner.cs
  2. +7 −0 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/DataItemDesigner.cs
  3. +1 −0 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/DesignerHelper.cs
  4. +8 −0 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/GroupedRowDesigner.cs
  5. +6 −0 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/ImageDesigner.cs
  6. +7 −0 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/LineDesigner.cs
  7. +7 −0 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/SectionDesigner.cs
  8. +7 −0 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/ShapeDesigner.cs
  9. +4 −4 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/TableDesigner.cs
  10. +6 −0 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/TextItemDesigner.cs
  11. +0 −4 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportItems/AbstractItem.cs
  12. +1 −1 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/BaseItems/BaseReportItem.cs
  13. +2 −2 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/BaseItems/BaseSection.cs
  14. +7 −61 ...dIns/Misc/Reports/ICSharpCode.Reports.Core/Project/DataManager/ListStrategy/CollectionStrategy.cs
  15. +0 −28 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Exporter/BasePager.cs
  16. +0 −3 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Exporter/GapList.cs
  17. +0 −1 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/EvaluationHelper.cs
  18. +2 −26 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/ExpressionEvaluatorFacade.cs
  19. +3 −1 .../Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/ReportingLanguage/ReportingLanguage.cs
  20. +16 −8 ...ct/Expressions/SimpleExpressionEvaluator/Compilation/Functions/ReportingService/FieldReference.cs
  21. +1 −1 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Printing/RendererFactory.cs
View
6 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/ContainerItemDesigner.cs
@@ -34,6 +34,12 @@ public override void Initialize(IComponent component)
GetService ();
}
+ protected override void PostFilterProperties(System.Collections.IDictionary properties)
+ {
+ DesignerHelper.RemoveProperties(properties);
+ base.PostFilterProperties(properties);
+ }
+
protected override void OnDragDrop(DragEventArgs de)
{
View
7 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/DataItemDesigner.cs
@@ -24,6 +24,13 @@ public override void Initialize(IComponent component)
GetService();
}
+ protected override void PostFilterProperties(System.Collections.IDictionary properties)
+ {
+ DesignerHelper.RemoveProperties(properties);
+ base.PostFilterProperties(properties);
+ }
+
+
#region SmartTags
public override DesignerActionListCollection ActionLists {
View
1 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/DesignerHelper.cs
@@ -48,6 +48,7 @@ public static void RemoveProperties (IDictionary properties)
properties.Remove("TabStop");
properties.Remove("Tag");
properties.Remove("UseWaitCursor");
+ properties.Remove("Visible");
}
public static void Remove (IDictionary properties,string[] toRemove)
View
8 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/GroupedRowDesigner.cs
@@ -26,6 +26,14 @@ public override void Initialize(IComponent component)
GetService();
}
+
+ protected override void PostFilterProperties(System.Collections.IDictionary properties)
+ {
+ DesignerHelper.RemoveProperties(properties);
+ base.PostFilterProperties(properties);
+ }
+
+
private void GetService ()
{
selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
View
6 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/ImageDesigner.cs
@@ -44,6 +44,12 @@ public override void Initialize(IComponent component)
}
+ protected override void PostFilterProperties(System.Collections.IDictionary properties)
+ {
+ DesignerHelper.RemoveProperties(properties);
+ base.PostFilterProperties(properties);
+ }
+
private void OnComponentChanging (object sender,ComponentChangingEventArgs e)
{
// System.Console.WriteLine("changing");
View
7 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/LineDesigner.cs
@@ -47,6 +47,13 @@ public override void Initialize(IComponent component)
}
+ protected override void PostFilterProperties(System.Collections.IDictionary properties)
+ {
+ DesignerHelper.RemoveProperties(properties);
+ base.PostFilterProperties(properties);
+ }
+
+
#region events
private void OnComponentChanging (object sender,ComponentChangingEventArgs e)
View
7 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/SectionDesigner.cs
@@ -65,6 +65,13 @@ public override bool CanBeParentedTo(System.ComponentModel.Design.IDesigner pare
}
+ protected override void PostFilterProperties(System.Collections.IDictionary properties)
+ {
+ DesignerHelper.RemoveProperties(properties);
+ base.PostFilterProperties(properties);
+ }
+
+
private void OnSelectionChanged(object sender, EventArgs e)
{
Control.Invalidate( );
View
7 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/ShapeDesigner.cs
@@ -44,6 +44,13 @@ public override void Initialize(IComponent component)
}
+
+ protected override void PostFilterProperties(System.Collections.IDictionary properties)
+ {
+ DesignerHelper.RemoveProperties(properties);
+ base.PostFilterProperties(properties);
+ }
+
private void OnComponentChanging (object sender,ComponentChangingEventArgs e)
{
// System.Console.WriteLine("changing");
View
8 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/TableDesigner.cs
@@ -33,13 +33,13 @@ public override void Initialize(IComponent component)
base.Initialize(component);
GetService ();
}
+
- /*
- public override bool CanBeParentedTo(System.ComponentModel.Design.IDesigner parentDesigner)
+ protected override void PostFilterProperties(System.Collections.IDictionary properties)
{
- return false;
+ DesignerHelper.RemoveProperties(properties);
+ base.PostFilterProperties(properties);
}
- */
public override bool CanParent(Control control)
View
6 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Designer/TextItemDesigner.cs
@@ -28,6 +28,12 @@ public override void Initialize(IComponent component)
this.ctrl = (BaseTextItem) component;
}
+ protected override void PostFilterProperties(System.Collections.IDictionary properties)
+ {
+ DesignerHelper.RemoveProperties(properties);
+ base.PostFilterProperties(properties);
+ }
+
private void GetService ()
{
View
4 src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportItems/AbstractItem.cs
@@ -64,12 +64,8 @@ protected void DrawControl (Graphics graphics,Rectangle borderRectangle)
Description("Draw a Border around the Item")]
public bool DrawBorder {get;set;}
-
protected new Size DefaultSize {get;set;}
-
-
-
public bool VisibleInReport {get;set;}
#endregion
View
2 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/BaseItems/BaseReportItem.cs
@@ -110,7 +110,7 @@ protected virtual Rectangle DisplayRectangle
#region Properties
-// public bool Visible {get;set;}
+ public bool Visible {get;set;}
public bool VisibleInReport {get;set;}
View
4 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/BaseItems/BaseSection.cs
@@ -148,11 +148,11 @@ public Size MeasureOverride (Size availableSize)
// resultSize.Width = double.IsPositiveInfinity(availableSize.Width) ?
// resultSize.Width : availableSize.Width;
-//
+//
// resultSize.Height = double.IsPositiveInfinity(availableSize.Height) ?
// resultSize.Height : availableSize.Height;
- resultSize.Width = double.IsPositiveInfinity(availableSize.Width) ?
+ resultSize.Width = double.IsPositiveInfinity(availableSize.Width) ?
resultSize.Width : availableSize.Width;
var b = double.IsPositiveInfinity(availableSize.Height);
resultSize.Height = double.IsPositiveInfinity(availableSize.Height) ?
View
68 ...c/Reports/ICSharpCode.Reports.Core/Project/DataManager/ListStrategy/CollectionStrategy.cs
@@ -200,6 +200,8 @@ public override void Bind()
#endregion
+
+ #region Fill
public override void Fill(int position,ReportItemCollection collection)
{
@@ -210,6 +212,11 @@ public override void Fill(int position,ReportItemCollection collection)
}
}
+ public override void Fill(IDataItem item)
+ {
+ FillInternal(Current,item);
+ }
+
private void FillInternal(object fillFrom,IDataItem item)
{
@@ -248,67 +255,6 @@ private void FillInternal(object fillFrom,IDataItem item)
}
}
- /*
- private void FillInternal(object fillFrom,IDataItem item)
- {
- if (item is BaseDataItem)
- {
- var retVal = FollowPropertyPath(fillFrom,item.ColumnName);
- if (retVal != null) {
- item.DBValue = retVal.ToString();
- } else {
- item.DBValue = String.Empty;
- }
- }
-
- else
- {
- //image processing from IList
- BaseImageItem baseImageItem = item as BaseImageItem;
-
- if (baseImageItem != null) {
- PropertyDescriptor p = this.listProperties.Find(baseImageItem.ColumnName, true);
- if (p != null) {
- baseImageItem.Image = p.GetValue(this.Current) as System.Drawing.Image;
- }
- return;
- }
-
- }
- }
- */
-
- public override void Fill(IDataItem item)
- {
- FillInternal(Current,item);
- }
-
- #region PropertyPath from StackOverflow
-
- //http://stackoverflow.com/questions/366332/best-way-to-get-sub-properties-using-getproperty
-
- /*
- private static object FollowPropertyPath(object value, string path)
- {
- Type currentType = value.GetType();
- foreach (string propertyName in path.Split('.'))
- {
-
- PropertyInfo property = currentType.GetProperty(propertyName);
-
- if (property != null) {
-
- value = property.GetValue(value, null);
- currentType = property.PropertyType;
- } else {
-
- return WrongColumnName(path);
- }
- }
- return value;
- }
- */
-
#endregion
static string WrongColumnName(string propertyName)
View
28 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Exporter/BasePager.cs
@@ -64,8 +64,6 @@ protected void InitNewPage ()
if (this.EvaluatorFacade == null)
{
- Console.WriteLine ("");
- Console.WriteLine ("InitNewPage create evaluator");
EvaluatorFacade = EvaluationHelper.CreateEvaluator(SinglePage,SinglePage.IDataNavigator);
}
EvaluatorFacade.SinglePage = this.SinglePage;
@@ -182,7 +180,6 @@ protected ExporterCollection old_ConvertSection (BaseSection section,int dataRow
if (section.Items.Count > 0)
{
Size sectionSize = section.Size;
- Console.WriteLine ("BasePager-createEval for {0}",section.Name);
IExpressionEvaluatorFacade evaluator = EvaluationHelper.CreateEvaluator(this.SinglePage,this.SinglePage.IDataNavigator);
Rectangle desiredRectangle = LayoutHelper.CalculateSectionLayout(this.Graphics,section);
@@ -309,40 +306,15 @@ protected void FinishRendering (IDataNavigator dataNavigator)
if (this.Pages.Count == 0) {
return;
}
- Console.WriteLine ("FinishRendereing create IExpressionEvaluatorFacade");
-
- //IExpressionEvaluatorFacade evaluatorFacade = new ExpressionEvaluatorFacade(this.SinglePage);
- //Evaluator.SinglePage = this.SinglePage;
foreach (ExporterPage page in this.pages)
{
page.TotalPages = this.Pages.Count;
-// dataNavigator.Reset();
-// dataNavigator.MoveNext();
page.IDataNavigator = dataNavigator;
EvaluatorFacade.SinglePage = page;
EvaluateRecursive(EvaluatorFacade,page.Items);
}
}
- /*
- protected void FinishRendering (IDataNavigator dataNavigator)
- {
- if (this.Pages.Count == 0) {
- return;
- }
- Console.WriteLine ("FinishRendereing create IExpressionEvaluatorFacade");
-
- IExpressionEvaluatorFacade evaluatorFacade = new ExpressionEvaluatorFacade(this.SinglePage);
-
- foreach (ExporterPage p in this.pages)
- {
- p.TotalPages = this.Pages.Count;
- p.IDataNavigator = dataNavigator;
- evaluatorFacade.SinglePage = p;
- EvaluateRecursive(evaluatorFacade,p.Items);
- }
- }
- */
private static void EvaluateRecursive (IExpressionEvaluatorFacade evaluatorFassade,ExporterCollection items)
{
View
3 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Exporter/GapList.cs
@@ -27,9 +27,6 @@ public void CalculateGapList (BaseSection section)
for (int i = 0; i < section.Items.Count; i++) {
GapBetweenItems[i] = CalculateGap(oldItem,section.Items[i]);
}
- for (int i = 0; i < section.Items.Count; i++) {
- Console.WriteLine(GapBetweenItems[i]);
- }
GapBetweenItems[section.Items.Count] = CalculateLastGap(section);
}
View
1 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/EvaluationHelper.cs
@@ -33,7 +33,6 @@ public static IExpressionEvaluatorFacade CreateEvaluator (ISinglePage singlePag
throw new ArgumentNullException("singlePage");
}
- Console.WriteLine ("EvaluationHelper.CreateEvaluator");
singlePage.IDataNavigator = dataNavigator;
IExpressionEvaluatorFacade evaluatorFacade = new ExpressionEvaluatorFacade(singlePage);
return evaluatorFacade;
View
28 ...ns/Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/ExpressionEvaluatorFacade.cs
@@ -23,7 +23,6 @@ public class ExpressionEvaluatorFacade:IExpressionEvaluatorFacade
public ExpressionEvaluatorFacade(IPageInfo pageInfo)
{
- Console.WriteLine("Eval-fassade Constr");
compiler = new ReportingLanguageCompiler();
this.context = new ExpressionContext(null);
context.ResolveUnknownVariable += VariableStore;
@@ -36,18 +35,13 @@ public ExpressionEvaluatorFacade(IPageInfo pageInfo)
public string Evaluate (string expression)
{
try {
-
string s = EvaluationHelper.ExtractExpressionPart(expression);
+ string r = EvaluationHelper.ExtractResultPart(expression);
if (s.Length > 0) {
this.context.ContextObject = this.SinglePage ;
return EvaluateExpression (s);
}
-// if (EvaluationHelper.CanEvaluate(expression)) {
-// this.context.ContextObject = this.SinglePage;
-// return EvaluateExpression(expression);
-// }
-
} catch (Exception e) {
expression = e.Message;
WriteLogMessage(e);
@@ -72,22 +66,6 @@ public string Evaluate (string expression, object row)
return expression;
}
- /*
- public string Evaluate (string expression, object row)
- {
- try {
- if (EvaluationHelper.CanEvaluate(expression)) {
- this.context.ContextObject = row;
- return EvaluateExpression (expression);
- }
- } catch (Exception e) {
- expression = e.Message;
- WriteLogMessage(e);
- }
-
- return expression;
- }
- */
public void Evaluate (IReportExpression expressionItem)
{
@@ -100,15 +78,13 @@ public void Evaluate (IReportExpression expressionItem)
} else {
expr = expressionItem.Text;
}
-
expressionItem.Text = Evaluate(expr);
}
-
string EvaluateExpression(string expression)
{
- IExpression compiled = compiler.CompileExpression<string>(expression);
+ IExpression compiled = compiler.CompileExpression<string>(expression);
if (compiled != null) {
return (compiled.Evaluate(context)).ToString();
}
View
4 ...ports/ICSharpCode.Reports.Core/Project/Expressions/ReportingLanguage/ReportingLanguage.cs
@@ -133,7 +133,9 @@ public ReportingLanguage():base(false)
LUnOp.Rule = Symbol("-")
| "!";
- FunctionExpression.Rule = QualifiedName + LCb + ExprList.Q() + RCb;
+ FunctionExpression.Rule = QualifiedName + LCb + ExprList.Q() + RCb
+ | QualifiedName + LCb + BinExpr + RCb;
+
QualifiedName.Rule = identifier
| QualifiedName + dot + identifier
View
24 ...ssions/SimpleExpressionEvaluator/Compilation/Functions/ReportingService/FieldReference.cs
@@ -54,15 +54,23 @@ string ExtractValueFromSinglePage(ref Variable variable, ISinglePage singlePage,
{
if (singlePage.IDataNavigator.CurrentRow > -1)
{
- var dataRow = singlePage.IDataNavigator.GetDataRow;
- var item = dataRow.Find(variable.VariableName);
- if (item != null) {
- retval = item.Value.ToString();
- } else {
- retval = GlobalValues.UnkownFunctionMessage(variable.VariableName);
- WriteLogmessage(variable);
+ try {
+ var dataRow = singlePage.IDataNavigator.GetDataRow;
+ var item = dataRow.Find(variable.VariableName);
+
+ if (item != null) {
+ retval = item.Value.ToString();
+ } else {
+ retval = GlobalValues.UnkownFunctionMessage(variable.VariableName);
+ WriteLogmessage(variable);
+ }
+
+ return retval;
+ } catch (Exception e) {
+ Console.WriteLine ("Error in FieldReference.ExtractValueFromSinglePage");
+ Console.WriteLine("IDataNavigator currentrow = {0} count = {1}",singlePage.IDataNavigator.CurrentRow,singlePage.IDataNavigator.Count);
+ throw e;
}
- return retval;
}
return variable.VariableName;
}
View
2 src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Printing/RendererFactory.cs
@@ -29,7 +29,7 @@ public static class PrintRendererFactory
if (t.Equals(typeof(BaseRowItem))) {
// return new GroupedRowConverter (dataNavigator,singlePage,layouter);
- Console.WriteLine("render Row");
+// Console.WriteLine("render Row");
}
return null;
}

No commit comments for this range

Something went wrong with that request. Please try again.