private void functionBox(TextBox txt)
        {
            DialogExprEditor ee = new DialogExprEditor(_Draw, txt.Text, _ReportItems[0], false);

            try
            {
                if (ee.ShowDialog() == DialogResult.OK)
                {
                    txt.Text = ee.Expression;
                }
            }
            finally
            {
                ee.Dispose();
            }
            return;
        }
        private void bDataLabelExpr_Click(object sender, EventArgs e)
        {
            DialogExprEditor ee = new DialogExprEditor(_Draw, cbDataLabel.Text, _ReportItems[0], false);

            try
            {
                if (ee.ShowDialog() == DialogResult.OK)
                {
                    cbDataLabel.Text = ee.Expression;
                }
            }
            finally
            {
                ee.Dispose();
            }
            return;
        }
           private void functionBox(TextBox txt)
           {
                DialogExprEditor ee = new DialogExprEditor(_Draw, txt.Text,_ReportItems[0] , false);
                try
                {
                    if (ee.ShowDialog() == DialogResult.OK)
                    {                 
                        txt.Text = ee.Expression;
                    }

                }
            finally
            {
                ee.Dispose();
            }
            return;
           }
        private void bDataExpr_Click(object sender, System.EventArgs e)
        {
            Button bs = sender as Button;

            if (bs == null)
            {
                return;
            }
            Control ctl = null;

            switch (bs.Tag as string)
            {
            case "d1":
                ctl = cbChartData;
                break;

            case "d2":
                ctl = cbChartData2;
                break;

            case "d3":
                ctl = cbChartData3;
                break;

            //AJM GJL 14082008
            case "d4":
                ctl     = cbVector;
                fVector = true;
                break;

            case "d5":
                ctl        = cbChartType;
                fChartType = true;
                break;

            case "d6":
                ctl      = cbPalette;
                fPalette = true;
                break;

            case "d7":
                ctl      = cbSubType;
                fSubtype = true;
                break;

            default:
                return;
            }
            DialogExprEditor ee = new DialogExprEditor(_Draw, ctl.Text, _ReportItems[0], false);

            try
            {
                DialogResult dlgr = ee.ShowDialog();
                if (dlgr == DialogResult.OK)
                {
                    ctl.Text   = ee.Expression;
                    fChartData = true;
                }
            }
            finally
            {
                ee.Dispose();
            }
        }
        private void bDataLabelExpr_Click(object sender, EventArgs e)
        {
            DialogExprEditor ee = new DialogExprEditor(_Draw, cbDataLabel.Text,_ReportItems[0] , false);
            try
            {
                if (ee.ShowDialog() == DialogResult.OK)
                {                 
                    cbDataLabel.Text = ee.Expression;
                }

            }
            finally
            {
                ee.Dispose();
            }
            return;
        }
        private void bDataExpr_Click(object sender, System.EventArgs e)
        {
            Button bs = sender as Button;
            if (bs == null)
                return;
            Control ctl = null; 
            switch (bs.Tag as string)
            {
                case "d1":
                    ctl = cbChartData;
                    break;
                case "d2":
                    ctl = cbChartData2;
                    break;
                case "d3":
                    ctl = cbChartData3;
                    break;
				//AJM GJL 14082008
                case "d4":
                    ctl = cbVector;
                    fVector = true;
                    break;
                case "d5":
                    ctl = cbChartType;
                    fChartType = true;
                    break;
                case "d6":
                    ctl = cbPalette;
                    fPalette = true;
                    break;
                case "d7":
                    ctl = cbSubType;
                    fSubtype = true;
                    break;
                default:
                    return;
            }
            DialogExprEditor ee = new DialogExprEditor(_Draw, ctl.Text, _ReportItems[0], false);
            try
            {
                DialogResult dlgr = ee.ShowDialog();
                if (dlgr == DialogResult.OK)
                {
                    ctl.Text = ee.Expression;
                    fChartData = true;
                }
            }
            finally
            {
                ee.Dispose();
            }
        }