string ExtractValueFromSinglePage(ref Variable variable, ISinglePage singlePage, ref string retval) { if (singlePage.IDataNavigator.CurrentRow > -1) { 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(variable.VariableName); }
public static void InitPage(ISinglePage singlePage, ReportSettings reportSettings) { singlePage.StartRow = -1; singlePage.EndRow = -1; singlePage.ReportFileName = reportSettings.FileName; singlePage.ReportName = reportSettings.ReportName; singlePage.ParameterHash = reportSettings.ParameterCollection.CreateHash(); }
public RenderTable(IDataNavigator datanavigator, Rectangle parentRectangle, ISinglePage singlePage, ILayouter layouter, BaseSection section) { this.dataNavigator = datanavigator; this.parentRectangle = parentRectangle; this.singlePage = singlePage; this.layouter = layouter; this.currentSection = section; }
public static IExpressionEvaluatorFacade CreateEvaluator (ISinglePage singlePage,IDataNavigator dataNavigator) { if (singlePage == null) { throw new ArgumentNullException("singlePage"); } singlePage.IDataNavigator = dataNavigator; IExpressionEvaluatorFacade evaluatorFacade = new ExpressionEvaluatorFacade(singlePage); return evaluatorFacade; }
public RenderTable(IDataNavigator datanavigator,Rectangle parentRectangle,ISinglePage singlePage,ILayouter layouter,BaseSection section) { this.dataNavigator = datanavigator; this.parentRectangle = parentRectangle; this.singlePage = singlePage; this.layouter = layouter; this.currentSection = section; }
public static IExpressionEvaluatorFacade CreateEvaluator(ISinglePage singlePage, IDataNavigator dataNavigator) { if (singlePage == null) { throw new ArgumentNullException("singlePage"); } singlePage.IDataNavigator = dataNavigator; IExpressionEvaluatorFacade evaluatorFacade = new ExpressionEvaluatorFacade(singlePage); return(evaluatorFacade); }
public void Calculate_PageHeader() { IReportModel model = ReportModel.Create(); ISinglePage singlePage = CreateSinglePage(model, 0); singlePage.CalculatePageBounds(model); Point expectedLocation = new Point(model.ReportSettings.LeftMargin, model.ReportSettings.TopMargin + singlePage.SectionBounds.ReportHeaderRectangle.Size.Height + 1); Assert.That(singlePage.SectionBounds.PageHeaderRectangle.Location, Is.EqualTo(expectedLocation)); }
public ReportPageEventArgs(PrintPageEventArgs e, ISinglePage singlePage, bool forceNewPage, Point locationAfterDraw){ if (singlePage == null) { throw new ArgumentNullException("pageInfo"); } this.printEventArgs = e; this.singlePage = singlePage; this.forceNewPage = forceNewPage; this.locationAfterDraw = locationAfterDraw; }
public override T Evaluate(IExpressionContext context) { ISinglePage singlePage = context.ContextObject as ISinglePage; if (singlePage != null) { return(EvaluateSinglePage(context)); } else { return(EvaluateFromContext(context)); } }
public ReportPageEventArgs(PrintPageEventArgs e, ISinglePage singlePage, bool forceNewPage, Point locationAfterDraw) { if (singlePage == null) { throw new ArgumentNullException("singlePage"); } this.printEventArgs = e; this.singlePage = singlePage; this.forceNewPage = forceNewPage; this.locationAfterDraw = locationAfterDraw; }
public static IBaseRenderer CreateRenderer (BaseReportItem itemToConvert,IDataNavigator dataNavigator, ISinglePage singlePage,ILayouter layouter,BaseSection section) { Type t = itemToConvert.GetType(); if (t.Equals(typeof(BaseTableItem))) { return new RenderTable(dataNavigator,Rectangle.Empty,singlePage,layouter,section); } if (t.Equals(typeof(BaseRowItem))) { // return new GroupedRowConverter (dataNavigator,singlePage,layouter); // Console.WriteLine("render Row"); } return null; }
public static IBaseRenderer CreateRenderer(BaseReportItem itemToConvert, IDataNavigator dataNavigator, ISinglePage singlePage, ILayouter layouter, BaseSection section) { Type t = itemToConvert.GetType(); if (t.Equals(typeof(BaseTableItem))) { Console.WriteLine("render Table"); return(new RenderTable(dataNavigator, Rectangle.Empty, singlePage, layouter, section)); } if (t.Equals(typeof(BaseRowItem))) { // return new GroupedRowConverter (dataNavigator,singlePage,layouter); Console.WriteLine("render Row"); } return(null); }
public override string Evaluate(SimpleExpressionEvaluator.Evaluation.IExpressionContext context) { Variable variable = Arguments[0] as Variable; string retval = string.Empty; ISinglePage singlePage = context.ContextObject as SinglePage; if (singlePage != null) { return(ExtractValueFromSinglePage(ref variable, singlePage, ref retval)); } DataRow row = context.ContextObject as DataRow; if (row != null) { return(ExtractValueFromDataRow(ref variable, retval, row)); } return(variable.VariableName); }
public override string Evaluate(SimpleExpressionEvaluator.Evaluation.IExpressionContext context) { ISinglePage singlePage = context.ContextObject as SinglePage; Variable variable = Arguments[0] as Variable; if (singlePage.IDataNavigator.CurrentRow > -1) { var dataRow = singlePage.IDataNavigator.GetDataRow(); var item = dataRow.Find(variable.VariableName); string retval; if (item != null) { retval = item.Value.ToString(); } else { retval = GlobalValues.UnkownFunctionMessage(variable.VariableName); } return(retval); } return(variable.VariableName); }
public static void InitPage (ISinglePage singlePage,ReportSettings reportSettings) { singlePage.ReportFileName = reportSettings.FileName; singlePage.ReportName = reportSettings.ReportName; singlePage.ParameterHash = reportSettings.ParameterCollection.CreateHash(); }
private IDataNavigator NavigatorFromContext(IExpressionContext context) { ISinglePage p = context.ContextObject as ISinglePage; return(p.IDataNavigator); }