private void BuildReportItemTabs()
        {
            XmlNode aNode = _Nodes[0];

            // Determine if all nodes are the same type
            string type = aNode.Name;

            if (type == "CustomReportItem")
            {
                // For customReportItems we use the type that is a parameter
                string t = _Draw.GetElementValue(aNode, "Type", "");
                if (t.Length > 0)
                {
                    type = t;
                }
            }

            foreach (XmlNode pNode in this._Nodes)
            {
                // For customReportItems we use the type that is a parameter
                string t = pNode.Name;
                if (t == "CustomReportItem")
                {
                    t = _Draw.GetElementValue(aNode, "Type", "");
                    if (t.Length == 0)       // Shouldn't happen
                    {
                        t = pNode.Name;
                    }
                }
                if (t != type)
                {
                    type = "";                  // Not all nodes have the same type
                }
            }

            EnsureStyle();      // Make sure we have Style nodes for all the report items

            if (_Nodes.Count > 1)
            {
                this.Text = "Group Selection Properties";
            }
            else
            {
                string name = _Draw.GetElementAttribute(aNode, "Name", "");
                this.Text = string.Format("{0} {1} Properties", type.Replace("fyi:", ""), name);
            }

            // Create all the tabs
            if (type == "Textbox")
            {
                StyleTextCtl stc = new StyleTextCtl(_Draw, this._Nodes);
                AddTab("Text", stc);
            }
            else if (type == "List")
            {
                ListCtl lc = new ListCtl(_Draw, this._Nodes);
                AddTab("List", lc);
                if (_Nodes.Count == 1)
                {
                    XmlNode    l  = _Nodes[0];
                    FiltersCtl fc = new FiltersCtl(_Draw, l);
                    AddTab("Filters", fc);
                    SortingCtl srtc = new SortingCtl(_Draw, l);
                    AddTab("Sorting", srtc);
                }
            }
            else if (type == "Chart")
            {
                ChartCtl cc = new ChartCtl(_Draw, this._Nodes);
                AddTab("Chart", cc);

                // 05122007 AJM & GJL Create a new StaticSeriesCtl tab
                StaticSeriesCtl ssc = new StaticSeriesCtl(_Draw, this._Nodes);
                if (ssc.ShowMe)
                {
                    //If the chart has static series, then show the StaticSeriesCtl GJL
                    AddTab("Static Series", ssc);
                }


                if (_Nodes.Count == 1)
                {
                    FiltersCtl fc = new FiltersCtl(_Draw, _Nodes[0]);
                    AddTab("Filters", fc);
                }
            }
            else if (type == "Image")
            {
                ImageCtl imgc = new ImageCtl(_Draw, this._Nodes);
                AddTab("Image", imgc);
            }
            else if (type == "Table")
            {
                XmlNode  table = _Nodes[0];
                TableCtl tc    = new TableCtl(_Draw, this._Nodes);
                AddTab("Table", tc);
                FiltersCtl fc = new FiltersCtl(_Draw, table);
                AddTab("Filters", fc);
                XmlNode details = _Draw.GetNamedChildNode(table, "Details");
                if (details != null)
                {       // if no details then we don't need details sorting
                    GroupingCtl grpc = new GroupingCtl(_Draw, details);
                    AddTab("Grouping", grpc);
                    SortingCtl srtc = new SortingCtl(_Draw, details);
                    AddTab("Sorting", srtc);
                }
                if (_TableColumn != null)
                {
                    TableColumnCtl tcc = new TableColumnCtl(_Draw, _TableColumn);
                    AddTab("Table Column", tcc);
                }
                if (_TableRow != null)
                {
                    TableRowCtl trc = new TableRowCtl(_Draw, _TableRow);
                    AddTab("Table Row", trc);
                }
            }
            else if (type == "fyi:Grid")
            {
                GridCtl gc = new GridCtl(_Draw, this._Nodes);
                AddTab("Grid", gc);
            }
            else if (type == "Matrix")
            {
                XmlNode   matrix = _Nodes[0];
                MatrixCtl mc     = new MatrixCtl(_Draw, this._Nodes);
                AddTab("Matrix", mc);
                FiltersCtl fc = new FiltersCtl(_Draw, matrix);
                AddTab("Filters", fc);
            }
            else if (type == "Subreport" && _Nodes.Count == 1)
            {
                XmlNode      subreport = _Nodes[0];
                SubreportCtl src       = new SubreportCtl(_Draw, subreport);
                AddTab("Subreport", src);
            }
            else if (aNode.Name == "CustomReportItem")
            {
                XmlNode             cri  = _Nodes[0];
                CustomReportItemCtl cric = new CustomReportItemCtl(_Draw, _Nodes);
                AddTab(type, cric);
            }

            // Position tab
            PositionCtl pc = new PositionCtl(_Draw, this._Nodes);

            AddTab("Name/Position", pc);

            // Border tab
            StyleBorderCtl bc = new StyleBorderCtl(_Draw, null, this._Nodes);

            AddTab("Border", bc);

            if (!(type == "Line" || type == "Subreport"))
            {
                // Style tab
                StyleCtl sc = new StyleCtl(_Draw, this._Nodes);
                AddTab("Style", sc);

                // Interactivity tab
                InteractivityCtl ic = new InteractivityCtl(_Draw, this._Nodes);
                AddTab("Interactivity", ic);
            }
        }
Esempio n. 2
0
        private void BuildReportItemTabs()
        {
            XmlNode aNode = _Nodes[0];

            // Determine if all nodes are the same type
            string type = aNode.Name;
            if (type == "CustomReportItem")
            {
                // For customReportItems we use the type that is a parameter
                string t = _Draw.GetElementValue(aNode, "Type", "");
                if (t.Length > 0)
                    type = t;
            }

            foreach (XmlNode pNode in this._Nodes)
            {
                // For customReportItems we use the type that is a parameter
                string t = pNode.Name;
                if (t == "CustomReportItem")
                {
                    t = _Draw.GetElementValue(aNode, "Type", "");
                    if (t.Length == 0)       // Shouldn't happen
                        t = pNode.Name;
                }
                if (t != type)
                    type = "";			// Not all nodes have the same type
            }

            EnsureStyle();	// Make sure we have Style nodes for all the report items

            if (_Nodes.Count > 1)
                Text = Strings.PropertyDialog_BuildReportItemTabs_GroupSelectionProperties;
            else
            {
                var name = _Draw.GetElementAttribute(aNode, "Name", "");
                Text = string.Format("{0} {1} " + Strings.PropertyDialog_BuildReportItemTabs_Properties, type.Replace("fyi:", ""), name);
            }

            // Create all the tabs
	        switch (type)
	        {
		        case "Textbox":
			        var stc = new StyleTextCtl(_Draw, _Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Text, stc);
			        break;

		        case "List":
			        var lc = new ListCtl(_Draw, _Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_List, lc);

			        if (_Nodes.Count == 1)
			        {
				        var l = _Nodes[0];
				        var fc = new FiltersCtl(_Draw, l);
				        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fc);
				        var srtc = new SortingCtl(_Draw, l);
				        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Sorting, srtc);
			        }
			        break;

		        case "Chart":
			        var cc = new ChartCtl(_Draw, _Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Chart, cc);

			        // 05122007 AJM & GJL Create a new StaticSeriesCtl tab
			        var ssc = new StaticSeriesCtl(_Draw, _Nodes);

			        if (ssc.ShowMe)
			        {
				        //If the chart has static series, then show the StaticSeriesCtl GJL
				        AddTab(Strings.PropertyDialog_BuildReportItemTabs_StaticSeries, ssc);
			        }

			        if (_Nodes.Count == 1)
			        {
				        var fc = new FiltersCtl(_Draw, _Nodes[0]);
						AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fc);
			        }
			        break;

		        case "Image":
			        var imgc = new ImageCtl(_Draw, _Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Image, imgc);
			        break;

				case "Table":
					var table = _Nodes[0];
					var tc = new TableCtl(_Draw, _Nodes);
					AddTab(Strings.PropertyDialog_BuildReportItemTabs_Table, tc);
				    var fct = new FiltersCtl(_Draw, table);
					AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fct);
			        var details = _Draw.GetNamedChildNode(table, "Details");

					if (details != null)
					{
						// if no details then we don't need details sorting
						var grpc = new GroupingCtl(_Draw, details);
						AddTab(Strings.PropertyDialog_BuildReportItemTabs_Grouping, grpc);
						var srtc = new SortingCtl(_Draw, details);
						AddTab(Strings.PropertyDialog_BuildReportItemTabs_Sorting, srtc);
					}

					if (_TableColumn != null)
					{
						var tcc = new TableColumnCtl(_Draw, _TableColumn);
						AddTab(Strings.PropertyDialog_BuildReportItemTabs_TableColumn, tcc);
					}

					if (_TableRow != null)
					{
						var trc = new TableRowCtl(_Draw, _TableRow);
						AddTab(Strings.PropertyDialog_BuildReportItemTabs_TableRow, trc);
					}
					break;

		        case "fyi:Grid":
			        var gc = new GridCtl(_Draw, this._Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Grid, gc);
			        break;

		        case "Matrix":
			        var matrix = _Nodes[0];
			        var mc = new MatrixCtl(_Draw, this._Nodes);
			        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Matrix, mc);
			        var fcm = new FiltersCtl(_Draw, matrix);
					AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fcm);
			        break;

		        case "Subreport":
			        if (_Nodes.Count == 1)
			        {
				        var subreport = _Nodes[0];
				        var src = new SubreportCtl(_Draw, subreport);
				        AddTab(Strings.PropertyDialog_BuildReportItemTabs_Subreport, src);
			        }
			        break;

				default:
			        if (aNode.Name == "CustomReportItem")
			        {
				        var cric = new CustomReportItemCtl(_Draw, _Nodes);
				        AddTab(type, cric);
			        }
			        break;
	        }

	        // Position tab
            var pc = new PositionCtl(_Draw, this._Nodes);
            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Name_Position, pc);

            // Border tab
            var bc = new StyleBorderCtl(_Draw, null, this._Nodes);
            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Border, bc);

            if (!(type == "Line" || type == "Subreport"))
            {
                // Style tab
                var sc = new StyleCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Style, sc);

                // Interactivity tab
                var ic = new InteractivityCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Interactivity, ic);
            }
        }
Esempio n. 3
0
        private void BuildReportItemTabs()
        {
            XmlNode aNode = _Nodes[0];

            // Determine if all nodes are the same type
            string type = aNode.Name;

            if (type == "CustomReportItem")
            {
                // For customReportItems we use the type that is a parameter
                string t = _Draw.GetElementValue(aNode, "Type", "");
                if (t.Length > 0)
                {
                    type = t;
                }
            }

            foreach (XmlNode pNode in this._Nodes)
            {
                // For customReportItems we use the type that is a parameter
                string t = pNode.Name;
                if (t == "CustomReportItem")
                {
                    t = _Draw.GetElementValue(aNode, "Type", "");
                    if (t.Length == 0)       // Shouldn't happen
                    {
                        t = pNode.Name;
                    }
                }
                if (t != type)
                {
                    type = "";                  // Not all nodes have the same type
                }
            }

            EnsureStyle();      // Make sure we have Style nodes for all the report items

            if (_Nodes.Count > 1)
            {
                Text = Strings.PropertyDialog_BuildReportItemTabs_GroupSelectionProperties;
            }
            else
            {
                var name = _Draw.GetElementAttribute(aNode, "Name", "");
                Text = string.Format("{0} {1} " + Strings.PropertyDialog_BuildReportItemTabs_Properties, type.Replace("fyi:", ""), name);
            }

            // Create all the tabs
            switch (type)
            {
            case "Textbox":
                var stc = new StyleTextCtl(_Draw, _Nodes, this);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Text, stc);
                break;

            case "List":
                var lc = new ListCtl(_Draw, _Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_List, lc);

                if (_Nodes.Count == 1)
                {
                    var l  = _Nodes[0];
                    var fc = new FiltersCtl(_Draw, l);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fc);
                    var srtc = new SortingCtl(_Draw, l);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Sorting, srtc);
                }
                break;

            case "Chart":
                var cc = new ChartCtl(_Draw, _Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Chart, cc);

                // 05122007 AJM & GJL Create a new StaticSeriesCtl tab
                var ssc = new StaticSeriesCtl(_Draw, _Nodes);

                if (ssc.ShowMe)
                {
                    //If the chart has static series, then show the StaticSeriesCtl GJL
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_StaticSeries, ssc);
                }

                if (_Nodes.Count == 1)
                {
                    var fc = new FiltersCtl(_Draw, _Nodes[0]);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fc);
                }
                break;

            case "Image":
                var imgc = new ImageCtl(_Draw, _Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Image, imgc);
                break;

            case "Table":
                var table = _Nodes[0];
                var tc    = new TableCtl(_Draw, _Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Table, tc);
                var fct = new FiltersCtl(_Draw, table);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fct);
                var details = _Draw.GetNamedChildNode(table, "Details");

                if (details != null)
                {
                    // if no details then we don't need details sorting
                    var grpc = new GroupingCtl(_Draw, details);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Grouping, grpc);
                    var srtc = new SortingCtl(_Draw, details);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Sorting, srtc);
                }

                if (_TableColumn != null)
                {
                    var tcc = new TableColumnCtl(_Draw, _TableColumn);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_TableColumn, tcc);
                }

                if (_TableRow != null)
                {
                    var trc = new TableRowCtl(_Draw, _TableRow);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_TableRow, trc);
                }
                break;

            case "fyi:Grid":
                var gc = new GridCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Grid, gc);
                break;

            case "Matrix":
                var matrix = _Nodes[0];
                var mc     = new MatrixCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Matrix, mc);
                var fcm = new FiltersCtl(_Draw, matrix);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Filters, fcm);
                break;

            case "Subreport":
                if (_Nodes.Count == 1)
                {
                    var subreport = _Nodes[0];
                    var src       = new SubreportCtl(_Draw, subreport);
                    AddTab(Strings.PropertyDialog_BuildReportItemTabs_Subreport, src);
                }
                break;

            default:
                if (aNode.Name == "CustomReportItem")
                {
                    var cric = new CustomReportItemCtl(_Draw, _Nodes);
                    AddTab(type, cric);
                }
                break;
            }

            // Position tab
            var pc = new PositionCtl(_Draw, this._Nodes);

            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Name_Position, pc);

            // Border tab
            var bc = new StyleBorderCtl(_Draw, null, this._Nodes);

            AddTab(Strings.PropertyDialog_BuildReportItemTabs_Border, bc);

            if (!(type == "Line" || type == "Subreport"))
            {
                // Style tab
                var sc = new StyleCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Style, sc);

                // Interactivity tab
                var ic = new InteractivityCtl(_Draw, this._Nodes);
                AddTab(Strings.PropertyDialog_BuildReportItemTabs_Interactivity, ic);
            }
        }
Esempio n. 4
0
		private void BuildReportItemTabs()
		{
			XmlNode aNode = _Nodes[0];

			// Determine if all nodes are the same type
			string type = aNode.Name;
            if (type == "CustomReportItem")
            {
                // For customReportItems we use the type that is a parameter
                string t = _Draw.GetElementValue(aNode, "Type", "");
                if (t.Length > 0)
                    type = t;
            }

			foreach (XmlNode pNode in this._Nodes)
			{
                // For customReportItems we use the type that is a parameter
                string t = pNode.Name;
                if (t == "CustomReportItem")
                {
                    t = _Draw.GetElementValue(aNode, "Type", "");
                    if (t.Length == 0)       // Shouldn't happen
                        t = pNode.Name;
                }
                if (t != type)
					type = "";			// Not all nodes have the same type
			}

			EnsureStyle();	// Make sure we have Style nodes for all the report items

			if (_Nodes.Count > 1)
				this.Text = "Group Selection Properties";
			else
			{
				string name = _Draw.GetElementAttribute(aNode, "Name", "");
				this.Text = string.Format("{0} {1} Properties", type, name);
			}

			// Create all the tabs
			if (type == "Textbox")
			{
				StyleTextCtl stc = new StyleTextCtl(_Draw, this._Nodes);
				AddTab("Text", stc);
			}
			else if (type == "List")
			{
				ListCtl lc = new ListCtl(_Draw, this._Nodes);
				AddTab("List", lc);
				if (_Nodes.Count == 1)
				{
					XmlNode l = _Nodes[0];
					FiltersCtl fc = new FiltersCtl(_Draw, l);
					AddTab("Filters", fc);
					SortingCtl srtc = new SortingCtl(_Draw, l);
					AddTab("Sorting", srtc);
				}
			}
			else if (type == "Chart")
			{
				ChartCtl cc = new ChartCtl(_Draw, this._Nodes);
				AddTab("Chart", cc);
				if (_Nodes.Count == 1)
				{
					FiltersCtl fc = new FiltersCtl(_Draw, _Nodes[0]);
					AddTab("Filters", fc);
				}
			}
			else if (type == "Image")
			{
				ImageCtl imgc = new ImageCtl(_Draw, this._Nodes);
				AddTab("Image", imgc);
			}
			else if (type == "Table")
			{
				XmlNode table = _Nodes[0];
				TableCtl tc = new TableCtl(_Draw, this._Nodes);
				AddTab("Table", tc);
				FiltersCtl fc = new FiltersCtl(_Draw, table);
				AddTab("Filters", fc);
				XmlNode details = _Draw.GetNamedChildNode(table, "Details");
				if (details != null)
				{	// if no details then we don't need details sorting
					GroupingCtl grpc = new GroupingCtl(_Draw, details);
					AddTab("Grouping", grpc);
					SortingCtl srtc = new SortingCtl(_Draw, details);
					AddTab("Sorting", srtc);
				}
				if (_TableColumn != null)
				{
					TableColumnCtl tcc = new TableColumnCtl(_Draw, _TableColumn);
					AddTab("Table Column", tcc);
				}
				if (_TableRow != null)
				{
					TableRowCtl trc = new TableRowCtl(_Draw, _TableRow);
					AddTab("Table Row", trc);
				}
			}
			else if (type == "Matrix")
			{
				XmlNode matrix = _Nodes[0];
				MatrixCtl mc = new MatrixCtl(_Draw, this._Nodes);
				AddTab("Matrix", mc);
				FiltersCtl fc = new FiltersCtl(_Draw, matrix);
				AddTab("Filters", fc);
			}
			else if (type == "Subreport" && _Nodes.Count == 1)
			{
				XmlNode subreport = _Nodes[0];
				SubreportCtl src = new SubreportCtl(_Draw, subreport);
				AddTab("Subreport", src);
			}
            else if (aNode.Name == "CustomReportItem")
            {
                XmlNode cri = _Nodes[0];
                CustomReportItemCtl cric = new CustomReportItemCtl(_Draw, _Nodes);
                AddTab(type, cric);
            }

			// Position tab
			PositionCtl pc = new PositionCtl(_Draw, this._Nodes);
			AddTab("Name/Position", pc);

			// Border tab
			StyleBorderCtl bc = new StyleBorderCtl(_Draw, this._Nodes);
			AddTab("Border", bc);

			if (! (type == "Line" || type == "Subreport"))
			{
				// Style tab
				StyleCtl sc = new StyleCtl(_Draw, this._Nodes);
				AddTab("Style", sc);

				// Interactivity tab
				InteractivityCtl ic = new InteractivityCtl(_Draw, this._Nodes);
				AddTab("Interactivity", ic);
			}
		}