Ejemplo n.º 1
0
        // Handle parsing of function in final pass
        override internal void FinalPass()
        {
            base.FinalPass();
            _Value.FinalPass();

            //The Changes below were added from Forum, User: solidstate http://www.fyireporting.com/forum/viewtopic.php?t=905
            if (this.DataElementName == null && this.Name == null)
            {
                // no name or dataelementname; try using expression
                FunctionField ff = _Value.Expr as FunctionField;
                if (ff != null && ff.Fld != null)
                {
                    this.DataElementName = ff.Fld.DataField;
                    this.Name            = ff.Fld.Name; // Added
                }

                FunctionAggr fa = _Value.Expr as FunctionAggr;
                if (fa != null)
                {
                    FunctionField ff2 = fa.Expr as FunctionField;
                    if (ff2 != null && ff2.Fld != null)
                    {
                        this.DataElementName = ff2.Fld.DataField;
                        this.Name            = ff2.Fld.Name;
                    }
                }
            }

            if (_ToggleImage != null)
            {
                _ToggleImage.FinalPass();
            }

            if (_HideDuplicates != null)
            {
                object o = OwnerReport.LUAggrScope[_HideDuplicates];
                if (o == null)
                {
                    OwnerReport.rl.LogError(4, "HideDuplicate '" + _HideDuplicates + "' is not a Group or DataSet name.   It will be ignored.");
                    _HideDuplicates = null;
                }
                else if (o is Grouping)
                {
                    Grouping g = o as Grouping;
                    g.AddHideDuplicates(this);
                }
                else if (o is DataSetDefn)
                {
                    DataSetDefn ds = o as DataSetDefn;
                    ds.AddHideDuplicates(this);
                }
            }
            return;
        }
Ejemplo n.º 2
0
        // Handle parsing of function in final pass
        override internal void FinalPass()
        {
            base.FinalPass();
            _Value.FinalPass();

            if (this.DataElementName == null && this.Name == null)
            {
                // no name or dataelementname; try using expression
                FunctionField ff = _Value.Expr as FunctionField;
                if (ff != null && ff.Fld != null)
                {
                    this.DataElementName = ff.Fld.DataField;
                }
            }

            if (_ToggleImage != null)
            {
                _ToggleImage.FinalPass();
            }

            if (_HideDuplicates != null)
            {
                object o = OwnerReport.LUAggrScope[_HideDuplicates];
                if (o == null)
                {
                    OwnerReport.rl.LogError(4, "HideDuplicate '" + _HideDuplicates + "' is not a Group or DataSet name.   It will be ignored.");
                    _HideDuplicates = null;
                }
                else if (o is Grouping)
                {
                    Grouping g = o as Grouping;
                    g.AddHideDuplicates(this);
                }
                else if (o is DataSetDefn)
                {
                    DataSetDefn ds = o as DataSetDefn;
                    ds.AddHideDuplicates(this);
                }
            }
            return;
        }