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); } }
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); } }