internal Subreport(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode) { _ReportName = null; _Parameters = null; _NoRows = null; _MergeTransactions = true; _SubReportGetContent = r.SubReportGetContent; // 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": _Parameters = new SubReportParameters(r, this, xNodeLoop); break; case "NoRows": _NoRows = new Expression(r, this, xNodeLoop, ExpressionType.String); break; case "MergeTransactions": _MergeTransactions = 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 Image element " + xNodeLoop.Name + " ignored."); break; } } if (_ReportName == null) { OwnerReport.rl.LogError(8, "Subreport requires the ReportName element."); } OwnerReport.ContainsSubreport = true; // owner report contains a subreport }
internal Subreport(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode) { _ReportName=null; _Parameters=null; _NoRows=null; _MergeTransactions=true; _SubReportGetContent = r.SubReportGetContent; // 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": _Parameters = new SubReportParameters(r, this, xNodeLoop); break; case "NoRows": _NoRows = new Expression(r, this, xNodeLoop, ExpressionType.String); break; case "MergeTransactions": _MergeTransactions = 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 Image element " + xNodeLoop.Name + " ignored."); break; } } if (_ReportName == null) OwnerReport.rl.LogError(8, "Subreport requires the ReportName element."); OwnerReport.ContainsSubreport = true; // owner report contains a subreport }