Exemplo n.º 1
0
        public override object calculate()
        {
            if (base.paramList.Count != 1)
            {
                throw new ReportError("取单元格显示值函数的参数个数应该为1");
            }
            ExpParse parse = (ExpParse)base.paramList[0];

            if (parse == null)
            {
                throw new ReportError("取单元格显示值函数的第1个参数应该是单元格");
            }
            object obj2 = parse.calculate();

            if (obj2 == null)
            {
                return(new StringBuilder("").ToString());
            }
            if (!(obj2 is CSVar))
            {
                throw new ReportError("取单元格显示值函数的第1个参数应该是单元格");
            }
            CellExt ext = ((CSVar)obj2).getCell();

            if (ext == null)
            {
                return(null);
            }
            return(ext.GetValue(true));
        }
Exemplo n.º 2
0
        public override object calculate()
        {
            int col = base.cs.Current.Col;
            int i   = 0;

            for (int j = 1; j < base.cs.RowSize; j++)
            {
                CellExt ext2 = base.cs.getCell(j, col);
                if ((ext2 != null) && !ext2.MergeCell)
                {
                    object obj3 = ext2.GetValue(true);
                    if (obj3 is string)
                    {
                        int num4 = this.method_0((string)obj3);
                        if (num4 > i)
                        {
                            i = num4;
                        }
                    }
                }
            }
            return(ConvertData.getInteger(i));
        }