Example #1
0
        public IReportBuffer Generate(object[] items)
        {
            _evaluator.AddVariable("items", items);
            foreach (var v in _globalVariables)
            {
                _evaluator.AddVariable("@" + v.Key, v.Value);
            }
            _rangeTags.Reset();

            if (IsHorizontal)
            {
                HorizontalTable(items, _evaluator);
            }
            else
            {
                VerticalTable(items, _evaluator);
            }
            return(_buff);
        }
Example #2
0
        public IReportBuffer Generate(object[] items)
        {
            var evaluator = new FormulaEvaluator();

            evaluator.AddVariable("items", items);
            _rangeTags.Reset();

            if (IsHorizontal)
            {
                HorizontalTable(items, evaluator);
            }
            else
            {
                VerticalTable(items, evaluator);
            }
            return(_buff);
        }
Example #3
0
 public void AddVariable(string alias, object value)
 {
     _variables.Add(alias, value);
     _evaluator.AddVariable(alias, value);
 }