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."); } }
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 = Conversion.ToBoolean(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."); } }
internal bool ReportItemElement(XmlNode xNodeLoop) { switch (xNodeLoop.Name) { case "Style": _Style = new Style(OwnerReport, this, xNodeLoop); break; case "Action": _Action = new Action(OwnerReport, this, xNodeLoop); break; case "Top": _Top = new RSize(OwnerReport, xNodeLoop); break; case "Left": _Left = new RSize(OwnerReport, xNodeLoop); break; case "Height": _Height = new RSize(OwnerReport, xNodeLoop); break; case "Width": _Width = new RSize(OwnerReport, xNodeLoop); break; case "ZIndex": _ZIndex = Conversion.ToInteger(xNodeLoop.InnerText); break; case "Visibility": _Visibility = new Visibility(OwnerReport, this, xNodeLoop); break; case "ToolTip": _ToolTip = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String); break; case "Label": _Label = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Variant); break; case "LinkToChild": _LinkToChild = xNodeLoop.InnerText; break; case "Bookmark": _Bookmark = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String); break; case "RepeatWith": _RepeatWith = xNodeLoop.InnerText; break; case "Custom": _Custom = new Custom(OwnerReport, this, xNodeLoop); break; case "DataElementName": _DataElementName = xNodeLoop.InnerText; break; case "DataElementOutput": _DataElementOutput = Reporting.Rdl.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; case "rd:DefaultName": break; // MS tag: we don't use but don't want to generate a warning default: return(false); // Not a report item element } return(true); }
//internal int PixelsY //{ // get // { // For now assume 96 dpi // decimal p = _Size; // p = p / PARTS_PER_INCH; // get it in inches // p = p * 96; // // if (p != 0) // return (int)p; // return (_Size > 0) ? 1 : (int)p; // } //} internal float ToPoints() { return(RSize.ToPoints(_Size)); }
/// <summary> /// Converts the size into pixels, assuming a 96 DPI. /// </summary> /// <param name="size">The size to be converted.</param> /// <returns>An int containing the size in pixels with a 96 DPI assumed.</returns> static public int ToPixels(int size) { return(RSize.ToPixels(size, (decimal)Measurement.STANDARD_DPI_X)); }
/// <summary> /// Converts the size into pixels. /// </summary> /// <param name="dpi">The dpi to be used in the convertion.</param> /// <returns>An int containing the size in pixels.</returns> internal int ToPixels(decimal dpi) { return(RSize.ToPixels(_Size, dpi)); }
// Return value as if specified as px //internal int PixelsX //{ // get // { // For now assume 96 dpi; TODO: what would be better way; shouldn't use server display pixels // decimal p = _Size; // p = p / PARTS_PER_INCH; // get it in inches // p = p * 96; // // if (p != 0) // return (int) p; // return (_Size > 0) ? 1 : (int) p; // } //} //static internal readonly float POINTSIZED = 72.27f; //static internal readonly decimal POINTSIZEM = 72.27m; //static internal int PixelsFromPoints(float x) //{ // int result = (int) (x * 96 / POINTSIZED); // convert to pixels // if (result == 0 && x > .0001f) // return 1; // return result; //} //static internal int PixelsFromPoints(Graphics g, float x) //{ // int result = (int) (x * g.DpiX / POINTSIZED); // convert to pixels // if (result == 0 && x > .0001f) // return 1; // return result; //} /// <summary> /// Converts the size into pixels, assuming Measurement.STANDARD_DPI_X. /// </summary> /// <returns>An int containing the size in pixels with Measurement.STANDARD_DPI_X assumed.</returns> internal int ToPixels() { return(RSize.ToPixels(_Size, (decimal)Measurement.STANDARD_DPI_X)); }
Type _CodeType; // used for parsing of expressions; DONT USE AT RUNTIME // Constructor internal ReportDefn(XmlNode xNode, ReportLog replog, string folder, NeedPassword getpswd, int objcount) // report has no parents { rl = replog; // used for error reporting _ObjectCount = objcount; // starting number for objects in this report; 0 other than for subreports GetDataSourceReferencePassword = getpswd; _ParseFolder = folder; _Description = null; _Author = null; _AutoRefresh = -1; _DataSourcesDefn = null; _DataSetsDefn = null; _Body = null; _Width = null; _PageHeader = null; _PageFooter = null; _PageHeight = null; _PageWidth = null; _LeftMargin = null; _RightMargin = null; _TopMargin = null; _BottomMargin = null; _EmbeddedImages = null; _Language = null; _CodeModules = null; _Code = null; _Classes = null; _DataTransform = null; _DataSchema = null; _DataElementName = null; _DataElementStyle = DataElementStyleEnum.AttributeNormal; _LUReportItems = new Hashtable(); // to hold all the textBoxes _LUAggrScope = new ListDictionary(); // to hold all dataset, dataregion, grouping names _LUEmbeddedImages = new ListDictionary(); // probably not very many _LUDynamicNames = new Hashtable(); _DataCache = new List <ICacheData>(); // 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 "Description": _Description = xNodeLoop.InnerText; break; case "Author": _Author = xNodeLoop.InnerText; break; case "AutoRefresh": _AutoRefresh = Conversion.ToInteger(xNodeLoop.InnerText); break; case "DataSources": _DataSourcesDefn = new DataSourcesDefn(this, null, xNodeLoop); break; case "DataSets": _DataSetsDefn = new DataSetsDefn(this, null, xNodeLoop); break; case "Body": _Body = new Body(this, null, xNodeLoop); break; case "ReportParameters": _ReportParameters = new ReportParameters(this, null, xNodeLoop); break; case "Width": _Width = new RSize(this, xNodeLoop); break; case "PageHeader": _PageHeader = new PageHeader(this, null, xNodeLoop); break; case "PageFooter": _PageFooter = new PageFooter(this, null, xNodeLoop); break; case "PageHeight": _PageHeight = new RSize(this, xNodeLoop); break; case "PageWidth": _PageWidth = new RSize(this, xNodeLoop); break; case "LeftMargin": _LeftMargin = new RSize(this, xNodeLoop); break; case "RightMargin": _RightMargin = new RSize(this, xNodeLoop); break; case "TopMargin": _TopMargin = new RSize(this, xNodeLoop); break; case "BottomMargin": _BottomMargin = new RSize(this, xNodeLoop); break; case "EmbeddedImages": _EmbeddedImages = new EmbeddedImages(this, null, xNodeLoop); break; case "Language": _Language = new Expression(this, null, xNodeLoop, ExpressionType.String); break; case "Code": _Code = new Code(this, null, xNodeLoop); break; case "CodeModules": _CodeModules = new CodeModules(this, null, xNodeLoop); break; case "Classes": _Classes = new Classes(this, null, xNodeLoop); break; case "DataTransform": _DataTransform = xNodeLoop.InnerText; break; case "DataSchema": _DataSchema = xNodeLoop.InnerText; break; case "DataElementName": _DataElementName = xNodeLoop.InnerText; break; case "DataElementStyle": _DataElementStyle = Reporting.Rdl.DataElementStyle.GetStyle(xNodeLoop.InnerText, this.rl); break; default: // don't know this element - log it this.rl.LogError(4, "Unknown Report element '" + xNodeLoop.Name + "' ignored."); break; } } if (_Body == null) { rl.LogError(8, "Body not specified for report."); } if (_Width == null) { rl.LogError(4, "Width not specified for report. Assuming page width."); } if (rl.MaxSeverity <= 4) // don't do final pass if already have serious errors { FinalPass(folder); // call final parser pass for expression resolution } // Cleanup any dangling resources if (_DataSourcesDefn != null) { _DataSourcesDefn.CleanUp(null); } }