List<ParameterValue> _Items; // list of ParameterValue #endregion Fields #region Constructors internal ParameterValues(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { ParameterValue pv; _Items = new List<ParameterValue>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "ParameterValue": pv = new ParameterValue(r, this, xNodeLoop); break; default: pv=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown ParameterValues element '" + xNodeLoop.Name + "' ignored."); break; } if (pv != null) _Items.Add(pv); } if (_Items.Count == 0) OwnerReport.rl.LogError(8, "For ParameterValues at least one ParameterValue is required."); else _Items.TrimExcess(); }
bool _FixedHeader=false; // Header of this column should be display even when scrolled internal TableColumn(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Width=null; _Visibility=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "Width": _Width = new RSize(r, xNodeLoop); break; case "Visibility": _Visibility = new Visibility(r, this, xNodeLoop); break; case "FixedHeader": _FixedHeader = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl); break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown TableColumn element '" + xNodeLoop.Name + "' ignored."); break; } } if (_Width == null) OwnerReport.rl.LogError(8, "TableColumn requires the Width element."); }
Field _lField; // resolved label name internal DataSetReference(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _DataSetName=null; _ValueField=null; _LabelField=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "DataSetName": _DataSetName = xNodeLoop.InnerText; break; case "ValueField": _ValueField = xNodeLoop.InnerText; break; case "LabelField": _LabelField = xNodeLoop.InnerText; break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown DataSetReference element '" + xNodeLoop.Name + "' ignored."); break; } } if (_DataSetName == null) OwnerReport.rl.LogError(8, "DataSetReference DataSetName is required but not specified."); if (_ValueField == null) OwnerReport.rl.LogError(8, "DataSetReference ValueField is required but not specified for" + _DataSetName==null? "<unknown name>": _DataSetName); }
List<TableGroup> _Items; // list of TableGroup entries internal TableGroups(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { TableGroup tg; _Items = new List<TableGroup>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "TableGroup": tg = new TableGroup(r, this, xNodeLoop); break; default: tg=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown TableGroups element '" + xNodeLoop.Name + "' ignored."); break; } if (tg != null) _Items.Add(tg); } if (_Items.Count == 0) OwnerReport.rl.LogError(8, "For TableGroups at least one TableGroup is required."); else _Items.TrimExcess(); }
StaticColumns _StaticColumns; // Static column headings for this grouping internal ColumnGrouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Height=null; _DynamicColumns=null; _StaticColumns=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "Height": _Height = new RSize(r, xNodeLoop); break; case "DynamicColumns": _DynamicColumns = new DynamicColumns(r, this, xNodeLoop); break; case "StaticColumns": _StaticColumns = new StaticColumns(r, this, xNodeLoop); break; default: break; } } if (_Height == null) OwnerReport.rl.LogError(8, "ColumnGrouping requires the Height element to be specified."); if ((_DynamicColumns != null && _StaticColumns != null) || (_DynamicColumns == null && _StaticColumns == null)) OwnerReport.rl.LogError(8, "ColumnGrouping requires either the DynamicColumns element or StaticColumns element but not both."); }
string _UniqueName; // unique name of expression; not always created internal Expression(ReportDefn r, ReportLink p, XmlNode xNode, ExpressionType et) : base(r, p) { _Source=xNode.InnerText; _Type = TypeCode.Empty; _ExpectedType = et; _Expr = null; }
Name _InstanceName; // The name of the variable to assign the class to. #endregion Fields #region Constructors // This variable can be used in expressions // throughout the report. internal ReportClass(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _ClassName=null; _InstanceName = null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "ClassName": _ClassName = xNodeLoop.InnerText; break; case "InstanceName": _InstanceName = new Name(xNodeLoop.InnerText); break; default: break; } } if (_ClassName == null) OwnerReport.rl.LogError(8, "Class ClassName is required but not specified."); if (_InstanceName == null) OwnerReport.rl.LogError(8, "Class InstanceName is required but not specified or invalid for " + _ClassName==null? "<unknown name>": _ClassName); }
List<DrillthroughParameter> _Items; // list of report items internal DrillthroughParameters(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { DrillthroughParameter d; _Items = new List<DrillthroughParameter>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "Parameter": d = new DrillthroughParameter(r, this, xNodeLoop); break; default: d=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Parameters element '" + xNodeLoop.Name + "' ignored."); break; } if (d != null) _Items.Add(d); } if (_Items.Count > 0) _Items.TrimExcess(); }
StaticRows _StaticRows; // Static row headings for this grouping internal RowGrouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Width=null; _DynamicRows=null; _StaticRows=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "Width": _Width = new RSize(r, xNodeLoop); break; case "DynamicRows": _DynamicRows = new DynamicRows(r, this, xNodeLoop); break; case "StaticRows": _StaticRows = new StaticRows(r, this, xNodeLoop); break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown RowGrouping element '" + xNodeLoop.Name + "' ignored."); break; } } if (_Width == null) OwnerReport.rl.LogError(8, "RowGrouping requires the Width element."); }
Style _Style; // border and background properties for series legend itmes and data points // when dynamic exprs are evaluated per group instance internal SeriesGrouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _DynamicSeries=null; _StaticSeries=null; _Style=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "DynamicSeries": _DynamicSeries = new DynamicSeries(r, this, xNodeLoop); break; case "StaticSeries": _StaticSeries = new StaticSeries(r, this, xNodeLoop); break; case "Style": _Style = new Style(OwnerReport, this, xNodeLoop); OwnerReport.rl.LogError(4, "Style element in SeriesGrouping is currently ignored."); // TODO break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown SeriesGrouping element '" + xNodeLoop.Name + "' ignored."); break; } } }
List<MatrixRow> _Items; // list of MatrixRow #endregion Fields #region Constructors internal MatrixRows(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { MatrixRow m; _Items = new List<MatrixRow>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "MatrixRow": m = new MatrixRow(r, this, xNodeLoop); break; default: m=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown MatrixRows element '" + xNodeLoop.Name + "' ignored."); break; } if (m != null) _Items.Add(m); } if (_Items.Count == 0) OwnerReport.rl.LogError(8, "For MatrixRows at least one MatrixRow is required."); else _Items.TrimExcess(); }
Expression _Label; // (string) The label displayed on the legend. internal DynamicSeries(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Grouping=null; _Sorting=null; _Label=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "Grouping": _Grouping = new Grouping(r, this, xNodeLoop); break; case "Sorting": _Sorting = new Sorting(r, this, xNodeLoop); break; case "Label": _Label = new Expression(r, this, xNodeLoop, ExpressionType.String); break; default: break; } } if (_Grouping == null) OwnerReport.rl.LogError(8, "DynamicSeries requires the Grouping element."); if (_Label == null) OwnerReport.rl.LogError(8, "DynamicSeries requires the Label element."); }
List<ChartSeries> _Items; // list of chart series internal ChartData(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { ChartSeries cs; _Items = new List<ChartSeries>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "ChartSeries": cs = new ChartSeries(r, this, xNodeLoop); break; default: cs=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown ChartData element '" + xNodeLoop.Name + "' ignored."); break; } if (cs != null) _Items.Add(cs); } if (_Items.Count == 0) OwnerReport.rl.LogError(8, "For ChartData at least one ChartSeries is required."); else _Items.TrimExcess(); }
StaticCategories _StaticCategories; // Category headings for this grouping #endregion Fields #region Constructors internal CategoryGrouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _DynamicCategories=null; _StaticCategories=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "DynamicCategories": _DynamicCategories = new DynamicCategories(r, this, xNodeLoop); break; case "StaticCategories": _StaticCategories = new StaticCategories(r, this, xNodeLoop); break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown CategoryGrouping element '" + xNodeLoop.Name + "' ignored."); break; } } if ((_DynamicCategories == null && _StaticCategories == null) || (_DynamicCategories != null && _StaticCategories != null)) OwnerReport.rl.LogError(8, "CategoryGrouping requires either DynamicCategories element or StaticCategories element, but not both."); }
MatrixCells _MatrixCells; // The set of cells in a row in the detail section of the Matrix. internal MatrixRow(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Height=null; _MatrixCells=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "Height": _Height = new RSize(r, xNodeLoop); break; case "MatrixCells": _MatrixCells = new MatrixCells(r, this, xNodeLoop); break; default: break; } } if (_MatrixCells == null) OwnerReport.rl.LogError(8, "MatrixRow requires the MatrixCells element."); }
string _ReportName; // URL The path of the drillthrough report. Paths may be #endregion Fields #region Constructors internal Drillthrough(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _ReportName=null; _DrillthroughParameters=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "ReportName": _ReportName = xNodeLoop.InnerText; break; case "Parameters": _DrillthroughParameters = new DrillthroughParameters(r, this, xNodeLoop); break; default: break; } } if (_ReportName == null) OwnerReport.rl.LogError(8, "Drillthrough requires the ReportName element."); }
List<TableCell> _Items; // list of TableCell internal TableCells(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { TableCell tc; _Items = new List<TableCell>(); // Loop thru all the child nodes int colIndex=0; // keep track of the column numbers foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "TableCell": tc = new TableCell(r, this, xNodeLoop, colIndex); colIndex += tc.ColSpan; break; default: tc=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown TableCells element '" + xNodeLoop.Name + "' ignored."); break; } if (tc != null) _Items.Add(tc); } if (_Items.Count > 0) _Items.TrimExcess(); }
TitlePositionEnum _Position; // The position of the title; Default: center internal Title(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Caption=null; _Style=null; _Position=TitlePositionEnum.Center; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "Caption": _Caption = new Expression(r, this, xNodeLoop, ExpressionType.String); break; case "Style": _Style = new Style(r, this, xNodeLoop); break; case "Position": _Position = TitlePosition.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Title element '" + xNodeLoop.Name + "' ignored."); break; } } }
SortDirectionEnum _Direction; // Indicates the direction of the sort // Ascending (Default) | Descending internal SortBy(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _SortExpression=null; _Direction=SortDirectionEnum.Ascending; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "SortExpression": _SortExpression = new Expression(r, this, xNodeLoop, ExpressionType.Variant); break; case "Direction": _Direction = SortDirection.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown SortBy element '" + xNodeLoop.Name + "' ignored."); break; } } if (_SortExpression == null) OwnerReport.rl.LogError(8, "SortBy requires the SortExpression element."); }
List<SeriesGrouping> _Items; // list of SeriesGrouping internal SeriesGroupings(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { SeriesGrouping sg; _Items = new List<SeriesGrouping>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "SeriesGrouping": sg = new SeriesGrouping(r, this, xNodeLoop); break; default: sg=null; // don't know what this is break; } if (sg != null) _Items.Add(sg); } if (_Items.Count == 0) OwnerReport.rl.LogError(8, "For SeriesGroupings at least one SeriesGrouping is required."); else _Items.TrimExcess(); }
List<GroupExpression> _Items; // list of GroupExpression internal GroupExpressions(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { GroupExpression g; _Items = new List<GroupExpression>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "GroupExpression": g = new GroupExpression(r, this, xNodeLoop); break; default: g=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown GroupExpressions element '" + xNodeLoop.Name + "' ignored."); break; } if (g != null) _Items.Add(g); } if (_Items.Count == 0) OwnerReport.rl.LogError(8, "GroupExpressions require at least one GroupExpression be defined."); else _Items.TrimExcess(); }
List<SortBy> _Items; // list of SortBy #endregion Fields #region Constructors internal Sorting(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { SortBy s; _Items = new List<SortBy>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "SortBy": s = new SortBy(r, this, xNodeLoop); break; default: s=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Sorting element '" + xNodeLoop.Name + "' ignored."); break; } if (s != null) _Items.Add(s); } if (_Items.Count == 0) OwnerReport.rl.LogError(8, "Sorting requires at least one SortBy be defined."); else _Items.TrimExcess(); }
internal Expression(ReportDefn r, ReportLink p, String xNode, ExpressionType et) : base(r, p) { _Source = xNode; _Type = TypeCode.Empty; _ExpectedType = et; _Expr = null; }
List<StaticColumn> _Items; // list of StaticColumn internal StaticColumns(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { StaticColumn sc; _Items = new List<StaticColumn>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "StaticColumn": sc = new StaticColumn(r, this, xNodeLoop); break; default: sc=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown StaticColumns element '" + xNodeLoop.Name + "' ignored."); break; } if (sc != null) _Items.Add(sc); } if (_Items.Count == 0) OwnerReport.rl.LogError(8, "For StaticColumns at least one StaticColumn is required."); else _Items.TrimExcess(); }
TableRows _TableRows; // The header rows for the table or group #endregion Fields #region Constructors // each page that the table (or group) is displayed internal Header(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _TableRows=null; _RepeatOnNewPage=false; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "TableRows": _TableRows = new TableRows(r, this, xNodeLoop); break; case "RepeatOnNewPage": _RepeatOnNewPage = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl); break; default: break; } } if (_TableRows == null) OwnerReport.rl.LogError(8, "Header requires the TableRows element."); }
MarkerTypeEnum _Type; // Defines the marker type for values. Default: none #endregion Fields #region Constructors // properties for the marker(s). internal Marker(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Type=MarkerTypeEnum.None; _Size=null; _Style=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "Type": _Type = MarkerType.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; case "Size": _Size = new RSize(r, xNodeLoop); break; case "Style": _Style = new Style(r, this, xNodeLoop); break; default: break; } } }
List<Filter> _Items; // list of Filter internal Filters(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { Filter f; _Items = new List<Filter>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "Filter": f = new Filter(r, this, xNodeLoop); break; default: f=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Filters element '" + xNodeLoop.Name + "' ignored."); break; } if (f != null) _Items.Add(f); } if (_Items.Count == 0) OwnerReport.rl.LogError(8, "Filters require at least one Filter be defined."); else _Items.TrimExcess(); }
List<DataPoint> _Items; // list of datapoint internal DataPoints(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { DataPoint dp; _Items = new List<DataPoint>(); // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "DataPoint": dp = new DataPoint(r, this, xNodeLoop); break; default: dp=null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown DataPoints element '" + xNodeLoop.Name + "' ignored."); break; } if (dp != null) _Items.Add(dp); } if (_Items.Count == 0) OwnerReport.rl.LogError(8, "For DataPoints at least one DataPoint is required."); else _Items.TrimExcess(); }
PlotTypeEnum _PlotType; // Indicates whether the series should be plotted // as a line in a Column chart. If set to auto, // should be plotted per the primary chart type. // Auto (Default) | Line internal ChartSeries(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Datapoints=null; _PlotType=PlotTypeEnum.Auto; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "DataPoints": _Datapoints = new DataPoints(r, this, xNodeLoop); break; case "PlotType": _PlotType = fyiReporting.RDL.PlotType.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown ChartSeries element '" + xNodeLoop.Name + "' ignored."); break; } } if (_Datapoints == null) OwnerReport.rl.LogError(8, "ChartSeries requires the DataPoints element."); }
string _ToggleItem; // The name of the textbox used to // hide/unhide this report item. Clicking on //an instance of the ToggleItem will toggle //the hidden state of every corresponding //instance of this item. If the Toggle item //becomes hidden, this item should become //hidden. //Must be a textbox in the same grouping //scope as this item or in any containing (ancestor) grouping scope //If omitted, no item will toggle the hidden //state of this item. //Not allowed on and cannot refer to report //items contained in a page header or //footer. //Cannot refer to a report item contained //within the current report item unless //current grouping scope has a Parent. internal Visibility(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Hidden=null; _ToggleItem=null; // Loop thru all the child nodes foreach(XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "Hidden": _Hidden = new Expression(r, this, xNodeLoop, ExpressionType.Boolean); break; case "ToggleItem": _ToggleItem = xNodeLoop.InnerText; break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Visibility element '" + xNodeLoop.Name + "' ignored."); break; } } }
bool _CanGrow; // if any TableRow contains a TextBox with CanGrow internal TableRows(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { TableRow t; _Items = new List <TableRow>(); _CanGrow = false; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "TableRow": t = new TableRow(r, this, xNodeLoop); break; default: t = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown TableRows element '" + xNodeLoop.Name + "' ignored."); break; } if (t != null) { _Items.Add(t); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "For TableRows at least one TableRow is required."); } else { _Items.TrimExcess(); } }
bool _ContainsArray; // true if any of the parameters is an array reference internal QueryParameters(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _ContainsArray = false; QueryParameter q; _Items = new List <QueryParameter>(); // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "QueryParameter": q = new QueryParameter(r, this, xNodeLoop); break; default: q = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown QueryParameters element '" + xNodeLoop.Name + "' ignored."); break; } if (q != null) { _Items.Add(q); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "For QueryParameters at least one QueryParameter is required."); } else { _Items.TrimExcess(); } }
ParameterValues _ParameterValues; // Hardcoded values for the parameter internal ValidValues(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _DataSetReference = null; _ParameterValues = null; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "DataSetReference": _DataSetReference = new DataSetReference(r, this, xNodeLoop); break; case "ParameterValues": _ParameterValues = new ParameterValues(r, this, xNodeLoop); break; default: OwnerReport.rl.LogError(4, "Unknown ValidValues element '" + xNodeLoop.Name + "' ignored."); break; } } if (_DataSetReference == null) { if (_ParameterValues == null) { OwnerReport.rl.LogError(8, "For ValidValues element either DataSetReference or ParameterValue must be specified, but not both."); } } else if (_ParameterValues != null) { OwnerReport.rl.LogError(8, "For ValidValues element either DataSetReference or ParameterValue must be specified, but not both."); } }
internal ColumnGroupings(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { ColumnGrouping g; _Items = new List <ColumnGrouping>(); // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "ColumnGrouping": g = new ColumnGrouping(r, this, xNodeLoop); break; default: g = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown ColumnGroupings element '" + xNodeLoop.Name + "' ignored."); break; } if (g != null) { _Items.Add(g); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "For ColumnGroups at least one ColumnGrouping is required."); } else { _Items.TrimExcess(); _StaticCount = GetStaticCount(); } }
StaticRows _StaticRows; // Static row headings for this grouping internal RowGrouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Width = null; _DynamicRows = null; _StaticRows = null; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "Width": _Width = new RSize(r, xNodeLoop); break; case "DynamicRows": _DynamicRows = new DynamicRows(r, this, xNodeLoop); break; case "StaticRows": _StaticRows = new StaticRows(r, this, xNodeLoop); break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown RowGrouping element '" + xNodeLoop.Name + "' ignored."); break; } } if (_Width == null) { OwnerReport.rl.LogError(8, "RowGrouping requires the Width element."); } }
internal Rectangle(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode) { _ReportItems = null; _PageBreakAtStart = false; _PageBreakAtEnd = false; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "ReportItems": _ReportItems = new ReportItems(r, this, xNodeLoop); break; case "PageBreakAtStart": _PageBreakAtStart = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl); break; case "PageBreakAtEnd": _PageBreakAtEnd = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl); break; default: if (ReportItemElement(xNodeLoop)) // try at ReportItem level { break; } // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Rectangle element " + xNodeLoop.Name + " ignored."); break; } } }
List <StaticMember> _Items; // list of StaticMember internal StaticSeries(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { StaticMember sm; _Items = new List <StaticMember>(); // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "StaticMember": sm = new StaticMember(r, this, xNodeLoop); break; default: sm = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown StaticSeries element '" + xNodeLoop.Name + "' ignored."); break; } if (sm != null) { _Items.Add(sm); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "For StaticSeries at least one StaticMember is required."); } else { _Items.TrimExcess(); } }
List <Filter> _Items; // list of Filter internal Filters(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { Filter f; _Items = new List <Filter>(); // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "Filter": f = new Filter(r, this, xNodeLoop); break; default: f = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Filters element '" + xNodeLoop.Name + "' ignored."); break; } if (f != null) { _Items.Add(f); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "Filters require at least one Filter be defined."); } else { _Items.TrimExcess(); } }
List <DataPoint> _Items; // list of datapoint internal DataPoints(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { DataPoint dp; _Items = new List <DataPoint>(); // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "DataPoint": dp = new DataPoint(r, this, xNodeLoop); break; default: dp = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown DataPoints element '" + xNodeLoop.Name + "' ignored."); break; } if (dp != null) { _Items.Add(dp); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "For DataPoints at least one DataPoint is required."); } else { _Items.TrimExcess(); } }
List <MatrixCell> _Items; // list of MatrixCell internal MatrixCells(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { MatrixCell m; _Items = new List <MatrixCell>(); // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "MatrixCell": m = new MatrixCell(r, this, xNodeLoop); break; default: m = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown MatrixCells element '" + xNodeLoop.Name + "' ignored."); break; } if (m != null) { _Items.Add(m); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "For MatrixCells at least one MatrixCell is required."); } else { _Items.TrimExcess(); } }
List <ChartSeries> _Items; // list of chart series internal ChartData(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { ChartSeries cs; _Items = new List <ChartSeries>(); // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "ChartSeries": cs = new ChartSeries(r, this, xNodeLoop); break; default: cs = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown ChartData element '" + xNodeLoop.Name + "' ignored."); break; } if (cs != null) { _Items.Add(cs); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "For ChartData at least one ChartSeries is required."); } else { _Items.TrimExcess(); } }
List <GroupExpression> _Items; // list of GroupExpression internal GroupExpressions(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { GroupExpression g; _Items = new List <GroupExpression>(); // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "GroupExpression": g = new GroupExpression(r, this, xNodeLoop); break; default: g = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown GroupExpressions element '" + xNodeLoop.Name + "' ignored."); break; } if (g != null) { _Items.Add(g); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "GroupExpressions require at least one GroupExpression be defined."); } else { _Items.TrimExcess(); } }
List <SortBy> _Items; // list of SortBy internal Sorting(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { SortBy s; _Items = new List <SortBy>(); // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "SortBy": s = new SortBy(r, this, xNodeLoop); break; default: s = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Sorting element '" + xNodeLoop.Name + "' ignored."); break; } if (s != null) { _Items.Add(s); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "Sorting requires at least one SortBy be defined."); } else { _Items.TrimExcess(); } }
bool _FixedHeader = false; // Header of this column should be display even when scrolled internal TableColumn(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Width = null; _Visibility = null; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "Width": _Width = new RSize(r, xNodeLoop); break; case "Visibility": _Visibility = new Visibility(r, this, xNodeLoop); break; case "FixedHeader": _FixedHeader = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl); break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown TableColumn element '" + xNodeLoop.Name + "' ignored."); break; } } if (_Width == null) { OwnerReport.rl.LogError(8, "TableColumn requires the Width element."); } }
List <TableCell> _Items; // list of TableCell internal TableCells(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { TableCell tc; _Items = new List <TableCell>(); // Loop thru all the child nodes int colIndex = 0; // keep track of the column numbers foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "TableCell": tc = new TableCell(r, this, xNodeLoop, colIndex); colIndex += tc.ColSpan; break; default: tc = null; // don't know what this is // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown TableCells element '" + xNodeLoop.Name + "' ignored."); break; } if (tc != null) { _Items.Add(tc); } } if (_Items.Count > 0) { _Items.TrimExcess(); } }
ReportItems _ReportItems; // The region that contains the elements of the corner layout // This ReportItems collection must contain exactly // one ReportItem. The Top, Left, Height and Width // for this ReportItem are ignored. The position is // taken to be 0, 0 and the size to be 100%, 100%. internal Corner(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _ReportItems = null; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "ReportItems": _ReportItems = new ReportItems(r, this, xNodeLoop); break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Corner element '" + xNodeLoop.Name + "' ignored."); break; } } }
List <SeriesGrouping> _Items; // list of SeriesGrouping internal SeriesGroupings(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { SeriesGrouping sg; _Items = new List <SeriesGrouping>(); // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "SeriesGrouping": sg = new SeriesGrouping(r, this, xNodeLoop); break; default: sg = null; // don't know what this is break; } if (sg != null) { _Items.Add(sg); } } if (_Items.Count == 0) { OwnerReport.rl.LogError(8, "For SeriesGroupings at least one SeriesGrouping is required."); } else { _Items.TrimExcess(); } }
RSize _Width; // Width of each detail cell in this column internal MatrixColumn(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Width = null; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "Width": _Width = new RSize(r, xNodeLoop); break; default: // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown MatrixColumn element '" + xNodeLoop.Name + "' ignored."); break; } } }
Name _InstanceName; // The name of the variable to assign the class to. // This variable can be used in expressions // throughout the report. internal ReportClass(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _ClassName = null; _InstanceName = null; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "ClassName": _ClassName = xNodeLoop.InnerText; break; case "InstanceName": _InstanceName = new Name(xNodeLoop.InnerText); break; default: break; } } if (_ClassName == null) { OwnerReport.rl.LogError(8, "Class ClassName is required but not specified."); } if (_InstanceName == null) { OwnerReport.rl.LogError(8, "Class InstanceName is required but not specified or invalid for " + _ClassName == null? "<unknown name>": _ClassName); } }
Expression _Label; //(Variant) The label displayed on the axis. internal DynamicCategories(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Grouping = null; _Sorting = null; _Label = null; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "Grouping": _Grouping = new Grouping(r, this, xNodeLoop); break; case "Sorting": _Sorting = new Sorting(r, this, xNodeLoop); break; case "Label": _Label = new Expression(r, this, xNodeLoop, ExpressionType.Variant); break; default: break; } } if (_Grouping == null) { OwnerReport.rl.LogError(8, "DynamicCategories requires the Grouping element."); } }
Assembly _Assembly; // the compiled assembly internal Code(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Source = xNode.InnerText; _Assembly = GetAssembly(); }
internal Textbox(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode) { _Value = null; _CanGrow = false; _CanShrink = false; _HideDuplicates = null; _ToggleImage = null; _DataElementStyle = DataElementStyleEnum.Auto; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "Value": _Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant); break; case "CanGrow": _CanGrow = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl); break; case "CanShrink": _CanShrink = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl); break; case "HideDuplicates": _HideDuplicates = xNodeLoop.InnerText; break; case "ToggleImage": _ToggleImage = new ToggleImage(r, this, xNodeLoop); break; case "DataElementStyle": _DataElementStyle = fyiReporting.RDL.DataElementStyle.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; default: if (ReportItemElement(xNodeLoop)) // try at ReportItem level { break; } // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Textbox element '" + xNodeLoop.Name + "' ignored."); break; } } if (_Value == null) { OwnerReport.rl.LogError(8, "Textbox value not specified for " + (this.Name == null? "'name not specified'": this.Name.Nm)); } if (this.Name != null) { try { OwnerReport.LUReportItems.Add(this.Name.Nm, this); // add to referenceable TextBoxes } catch // Duplicate name { OwnerReport.rl.LogError(4, "Duplicate Textbox name '" + this.Name.Nm + "' ignored."); } } }
Matrix _ChartMatrix; // Pseudo matrix to calculate chart data internal Chart(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode) { _Type = ChartTypeEnum.Column; _Subtype = ChartSubTypeEnum.Plain; _SeriesGroupings = null; _CategoryGroupings = null; _ChartData = null; _Legend = null; _CategoryAxis = null; _ValueAxis = null; _Title = null; _PointWidth = 0; _Palette = ChartPaletteEnum.Default; _ThreeDProperties = null; _PlotArea = null; _ChartElementOutput = ChartElementOutputEnum.Output; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "Type": _Type = ChartType.GetStyle(xNodeLoop.InnerText); if (_Type == ChartTypeEnum.Stock || _Type == ChartTypeEnum.Unknown) { OwnerReport.rl.LogError(8, "Chart type '" + xNodeLoop.InnerText + "' is not currently supported."); } break; case "Subtype": _Subtype = ChartSubType.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; case "SeriesGroupings": _SeriesGroupings = new SeriesGroupings(r, this, xNodeLoop); break; case "CategoryGroupings": _CategoryGroupings = new CategoryGroupings(r, this, xNodeLoop); break; case "ChartData": _ChartData = new ChartData(r, this, xNodeLoop); break; case "Legend": _Legend = new Legend(r, this, xNodeLoop); break; case "CategoryAxis": _CategoryAxis = new CategoryAxis(r, this, xNodeLoop); break; case "ValueAxis": _ValueAxis = new ValueAxis(r, this, xNodeLoop); break; case "Title": _Title = new Title(r, this, xNodeLoop); break; case "PointWidth": _PointWidth = XmlUtil.Integer(xNodeLoop.InnerText); break; case "Palette": _Palette = ChartPalette.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; case "ThreeDProperties": _ThreeDProperties = new ThreeDProperties(r, this, xNodeLoop); break; case "PlotArea": _PlotArea = new PlotArea(r, this, xNodeLoop); break; case "ChartElementOutput": _ChartElementOutput = fyiReporting.RDL.ChartElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; default: if (DataRegionElement(xNodeLoop)) // try at DataRegion level { break; } // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown Chart element '" + xNodeLoop.Name + "' ignored."); break; } } DataRegionFinish(); // Tidy up the DataRegion if (_SeriesGroupings == null && _CategoryGroupings == null) { OwnerReport.rl.LogError(8, "Chart requires either the SeriesGroupings element or CategoryGroupings element or both."); } if (OwnerReport.rl.MaxSeverity > 4) // if we already have severe error don't check for these additional issues { return; } // Do some specific checking based on the type of the Chart specified switch (_Type) { case ChartTypeEnum.Bubble: if (_ChartData == null || _ChartData.Items[0].Datapoints.Items[0].DataValues.Items.Count != 3) { OwnerReport.rl.LogError(8, "Bubble charts require three DataPoints defined."); } break; case ChartTypeEnum.Scatter: if (_ChartData == null || _ChartData.Items[0].Datapoints.Items[0].DataValues.Items.Count != 2) { OwnerReport.rl.LogError(8, "Scatter charts require two DataPoints defined."); } break; default: break; } }
internal void SetReportDefinition(ReportDefn r) { _Report = r; _UserParameters = null; // force recalculation of user parameters }
List <Textbox> _HideDuplicates; // holds any textboxes that use this as a hideduplicate scope internal DataSetDefn(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Name = null; _Fields = null; _Query = null; _CaseSensitivity = TrueFalseAutoEnum.True; _Collation = null; _AccentSensitivity = TrueFalseAutoEnum.False; _KanatypeSensitivity = TrueFalseAutoEnum.False; _WidthSensitivity = TrueFalseAutoEnum.False; _Filters = null; _HideDuplicates = null; // Run thru the attributes foreach (XmlAttribute xAttr in xNode.Attributes) { switch (xAttr.Name) { case "Name": _Name = new Name(xAttr.Value); break; } } // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "Fields": _Fields = new Fields(r, this, xNodeLoop); break; case "Query": _Query = new Query(r, this, xNodeLoop); break; case "Rows": // Extension !!!!!!!!!!!!!!!!!!!!!!! case "fyi:Rows": _XmlRowData = "<?xml version='1.0' encoding='UTF-8'?><Rows>" + xNodeLoop.InnerXml + "</Rows>"; foreach (XmlAttribute xA in xNodeLoop.Attributes) { if (xA.Name == "File") { _XmlRowFile = xA.Value; } } break; case "CaseSensitivity": _CaseSensitivity = TrueFalseAuto.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; case "Collation": _Collation = xNodeLoop.InnerText; break; case "AccentSensitivity": _AccentSensitivity = TrueFalseAuto.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; case "KanatypeSensitivity": _KanatypeSensitivity = TrueFalseAuto.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; case "WidthSensitivity": _WidthSensitivity = TrueFalseAuto.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; case "Filters": _Filters = new Filters(r, this, xNodeLoop); break; default: OwnerReport.rl.LogError(4, "Unknown DataSet element '" + xNodeLoop.Name + "' ignored."); break; } } if (this.Name != null) { OwnerReport.LUAggrScope.Add(this.Name.Nm, this); // add to referenceable TextBoxes } else { OwnerReport.rl.LogError(4, "Name attribute must be specified in a DataSet."); } if (_Query == null) { OwnerReport.rl.LogError(8, "Query element must be specified in a DataSet."); } }
internal void Add(ReportDefn rd, string name, object o) { _RunCache.Add(GetKey(rd, name), o); }
internal Table(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode) { _TableColumns = null; _Header = null; _TableGroups = null; _Details = null; _Footer = null; _FillPage = true; _DetailDataElementName = "Details"; _DetailDataCollectionName = "Details_Collection"; _DetailDataElementOutput = DataElementOutputEnum.Output; _IsGrid = xNode.Name != "Table"; // a grid is a restricted table to no data behind it // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "TableColumns": _TableColumns = new TableColumns(r, this, xNodeLoop); break; case "Header": _Header = new Header(r, this, xNodeLoop); break; case "TableGroups": _TableGroups = new TableGroups(r, this, xNodeLoop); break; case "Details": _Details = new Details(r, this, xNodeLoop); break; case "Footer": _Footer = new Footer(r, this, xNodeLoop); break; case "FillPage": _FillPage = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl); break; case "DetailDataElementName": _DetailDataElementName = xNodeLoop.InnerText; break; case "DetailDataCollectionName": _DetailDataCollectionName = xNodeLoop.InnerText; break; case "DetailDataElementOutput": _DetailDataElementOutput = fyiReporting.RDL.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; default: if (DataRegionElement(xNodeLoop)) // try at DataRegion level { break; } // don't know this element - log it OwnerReport.rl.LogError(4, "Unknown " + xNode.Name + " element '" + xNodeLoop.Name + "' ignored."); break; } } DataRegionFinish(); // Tidy up the DataRegion if (_TableColumns == null) { OwnerReport.rl.LogError(8, "TableColumns element must be specified for a " + xNode.Name + "."); return; } // Verify Grid restrictions if (_IsGrid) { if (_TableGroups != null) { OwnerReport.rl.LogError(8, "TableGroups not allowed in Grid element '" + xNode.Name + "'."); } } if (OwnerReport.rl.MaxSeverity < 8) { VerifyCC(); // Verify column count } }
internal object Get(ReportDefn rd, string name) { return(_RunCache[GetKey(rd, name)]); }
internal void Remove(ReportDefn rd, string name) { _RunCache.Remove(GetKey(rd, name)); }
internal ReportLink(ReportDefn r, ReportLink p) { OwnerReport = r; Parent = p; ObjectNumber = r.GetObjectNumber(); }