Beispiel #1
0
        IDictionary _Columns;                   // QueryColumn (when SQL)

        internal Query(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _DataSourceName   = null;
            _QueryCommandType = QueryCommandTypeEnum.Text;
            _CommandText      = null;
            _QueryParameters  = null;
            _Timeout          = 0;
            _RowLimit         = 0;

            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (xNodeLoop.Name)
                {
                case "DataSourceName":
                    _DataSourceName = xNodeLoop.InnerText;
                    break;

                case "CommandType":
                    _QueryCommandType = Engine.QueryCommandType.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "CommandText":
                    _CommandText = new Expression(r, this, xNodeLoop, ExpressionType.String);
                    break;

                case "QueryParameters":
                    _QueryParameters = new QueryParameters(r, this, xNodeLoop);
                    break;

                case "Timeout":
                    _Timeout = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "RowLimit":                                                        // Extension of RDL specification
                    _RowLimit = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Query element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }               // end of switch
            }                   // end of foreach

            // Resolve the data source name to the object
            if (_DataSourceName == null)
            {
                r.rl.LogError(8, "DataSourceName element not specified for Query.");
                return;
            }
        }
Beispiel #2
0
        Style _Style;                 // Default style information for the body

        internal Body(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _ReportItems   = null;
            _Height        = null;
            _Columns       = 1;
            _ColumnSpacing = 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 "ReportItems":
                    _ReportItems = new ReportItems(r, this, xNodeLoop);                                 // need a class for this
                    break;

                case "Height":
                    _Height = new RSize(r, xNodeLoop);
                    break;

                case "Columns":
                    _Columns = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "ColumnSpacing":
                    _ColumnSpacing = new RSize(r, xNodeLoop);
                    break;

                case "Style":
                    _Style = new Style(r, this, xNodeLoop);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Body element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_Height == null)
            {
                OwnerReport.rl.LogError(8, "Body Height not specified.");
            }
        }
Beispiel #3
0
        int _Rotation;                   // Angle of rotation of the label text

        internal DataLabel(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Style    = null;
            _Value    = null;
            _Visible  = false;
            _Position = DataLabelPositionEnum.Auto;
            _Rotation = 0;

            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (xNodeLoop.Name)
                {
                case "Style":
                    _Style = new Style(r, this, xNodeLoop);
                    break;

                case "Value":
                    _Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
                    break;

                case "Visible":
                    _Visible = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "Position":
                    _Position = DataLabelPosition.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "Rotation":
                    _Rotation = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                default:
                    break;
                }
            }
        }
Beispiel #4
0
        bool _CanOmit = false;    // When display values don't fit, is it OK to drop some from display

        internal Axis(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Visible        = false;
            _Style          = null;
            _Title          = null;
            _Title2         = null;// 20022008 AJM GJL
            _Margin         = false;
            _MajorTickMarks = AxisTickMarksEnum.None;
            _MinorTickMarks = AxisTickMarksEnum.None;
            _MajorGridLines = null;
            _MinorGridLines = null;
            _MajorInterval  = null;
            _MinorInterval  = null;
            _Reverse        = false;
            _CrossAt        = 0;
            _Interlaced     = false;
            _Scalar         = false;
            _Min            = null;
            _Max            = null;
            _LogScale       = false;
            _Month          = false; //12052008 WP

            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (xNodeLoop.Name)
                {
                case "Visible":
                    _Visible = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "Style":
                    _Style = new Style(r, this, xNodeLoop);
                    break;

                case "Title":
                    _Title = new Title(r, this, xNodeLoop);
                    break;

                // 20022008 AJM GJL - Second Y axis
                case "Title2":
                case "fyi:Title2":
                    _Title2 = new Title(r, this, xNodeLoop);
                    break;

                case "Margin":
                    _Margin = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "MajorTickMarks":
                    _MajorTickMarks = AxisTickMarks.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "MinorTickMarks":
                    _MinorTickMarks = AxisTickMarks.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "MajorGridLines":
                    _MajorGridLines = new ChartGridLines(r, this, xNodeLoop);
                    break;

                case "MinorGridLines":
                    _MinorGridLines = new ChartGridLines(r, this, xNodeLoop);
                    break;

                case "MajorInterval":
                    _MajorInterval = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Integer);
                    OwnerReport.rl.LogError(4, "Axis element MajorInterval is currently ignored.");
                    break;

                case "MinorInterval":
                    _MinorInterval = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Integer);
                    OwnerReport.rl.LogError(4, "Axis element MinorInterval is currently ignored.");
                    break;

                case "Reverse":
                    _Reverse = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "CrossAt":
                    _CrossAt = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "Interlaced":
                    _Interlaced = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "Scalar":
                    _Scalar = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "Min":
                    _Min = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Integer);
                    break;

                case "Max":
                    _Max = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Integer);
                    break;

                case "LogScale":
                    _LogScale = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "Month":
                case "fyi:Month":
                    _Month = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "fyi:CanOmit":
                    _CanOmit = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Axis element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
        }
Beispiel #5
0
        internal Chart(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode)
        {
            _Type                   = ChartTypeEnum.Column;
            _Subtype                = new Expression(r, p, "Plain", ExpressionType.Enum); //AJM GJL 14082008 Allowing Expression
            _SeriesGroupings        = null;
            _CategoryGroupings      = null;
            _ChartData              = null;
            _Legend                 = null;
            _CategoryAxis           = null;
            _ValueAxis              = null;
            _Title                  = null;
            _PointWidth             = 0;
            _Palette                = new Expression(r, p, "Default", ExpressionType.Enum); //AJM GJL 14082008 Allowing Expression
            _ThreeDProperties       = null;
            _PlotArea               = null;
            _ChartElementOutput     = ChartElementOutputEnum.Output;
            _isHYNEsWonderfulVector = new Expression(r, p, "False", ExpressionType.Boolean);
            _showTooltips           = new Expression(r, p, "False", ExpressionType.Boolean);
            _showTooltipsX          = new Expression(r, p, "False", ExpressionType.Boolean);
            _ToolTipXFormat         = new Expression(r, p, "", ExpressionType.String);
            _ToolTipYFormat         = new Expression(r, p, "", ExpressionType.String);

            // 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 = new Expression(r, p, xNodeLoop, ExpressionType.Enum);     //AJM GJL 14082008
                    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 = new Expression(r, p, xNodeLoop, ExpressionType.Enum);     //AJM GJL 14082008
                    break;

                case "ThreeDProperties":
                    _ThreeDProperties = new ThreeDProperties(r, this, xNodeLoop);
                    break;

                case "PlotArea":
                    _PlotArea = new PlotArea(r, this, xNodeLoop);
                    break;

                case "ChartElementOutput":
                    _ChartElementOutput = Engine.ChartElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "HyneWonderfulVector":     //AJM GJL 14082008
                case "RenderAsVector":
                case "fyi:RenderAsVector":
                    _isHYNEsWonderfulVector = new Expression(r, p, xNodeLoop, ExpressionType.Boolean);
                    break;

                case "fyi:tooltip":
                case "fyi:Tooltip":
                    _showTooltips = new Expression(r, p, xNodeLoop, ExpressionType.Boolean);
                    break;

                case "fyi:TooltipX":
                    _showTooltipsX = new Expression(r, p, xNodeLoop, ExpressionType.Boolean);
                    break;

                case "fyi:TooltipYFormat":
                    _ToolTipYFormat = new Expression(r, p, xNodeLoop, ExpressionType.Boolean);
                    break;

                case "fyi:TooltipXFormat":
                    _ToolTipXFormat = new Expression(r, p, xNodeLoop, ExpressionType.Boolean);
                    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;
            }
        }
Beispiel #6
0
        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 = XmlUtil.Integer(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 = Engine.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);
        }
        bool _Clustered;                                    // Determines if data series are clustered
        // (displayed along distinct rows). Only
        // applies to bar and column chart types.  Defaults to false.

        internal ThreeDProperties(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Enabled        = false;
            _ProjectionMode = ThreeDPropertiesProjectionModeEnum.Perspective;
            _Rotation       = 0;
            _Inclination    = 0;
            _Perspective    = 0;
            _HeightRatio    = 0;
            _DepthRatio     = 0;
            _Shading        = ThreeDPropertiesShadingEnum.None;
            _GapDepth       = 0;
            _WallThickness  = 0;
            _DrawingStyle   = ThreeDPropertiesDrawingStyleEnum.Cube;
            _Clustered      = false;

            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (xNodeLoop.Name)
                {
                case "Enabled":
                    _Enabled = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "ProjectionMode":
                    _ProjectionMode = ThreeDPropertiesProjectionMode.GetStyle(xNodeLoop.InnerText);
                    break;

                case "Rotation":
                    _Rotation = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "Inclination":
                    _Inclination = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "Perspective":
                    _Perspective = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "HeightRatio":
                    _HeightRatio = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "DepthRatio":
                    _DepthRatio = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "Shading":
                    _Shading = ThreeDPropertiesShading.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "GapDepth":
                    _GapDepth = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "WallThickness":
                    _WallThickness = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "DrawingStyle":
                    _DrawingStyle = ThreeDPropertiesDrawingStyle.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "Clustered":
                    _Clustered = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                default:
                    break;
                }
            }
        }
        bool _InTableFooter;                    // true if tablecell is part of footer; simplifies HTML processing

        internal TableCell(ReportDefn r, ReportLink p, XmlNode xNode, int colIndex) : base(r, p)
        {
            _ColIndex    = colIndex;
            _ReportItems = null;
            _ColSpan     = 1;

            // 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 "ColSpan":
                    _ColSpan = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown TableCell element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            // Must have exactly one ReportItems
            if (_ReportItems == null)
            {
                OwnerReport.rl.LogError(8, "ReportItems element is required with a TableCell but not specified.");
            }
            else if (_ReportItems.Items.Count != 1)
            {
                OwnerReport.rl.LogError(8, "Only one element in ReportItems element is allowed within a TableCell.");
            }

            // Obtain the tablecell's owner table;
            //		determine if tablecell is part of table header
            _InTableHeader = false;
            ReportLink rl;

            for (rl = this.Parent; rl != null; rl = rl.Parent)
            {
                if (rl is Table)
                {
                    _OwnerTable = (Table)rl;
                    break;
                }

                if (rl is Header && rl.Parent is Table)                 // Header and parent is Table (not TableGroup)
                {
                    _InTableHeader = true;
                }

                if (rl is Footer && rl.Parent is Table)                 // Header and parent is Table (not TableGroup)
                {
                    _InTableFooter = true;
                }
            }
            return;
        }
        Type _CodeType;                         // used for parsing of expressions; DONT USE AT RUNTIME

        // Constructor
        internal ReportDefn(XmlNode xNode, ReportLog replog, string folder, NeedPassword getpswd, int objcount, IRdlSourceLoader sourceLoader) // report has no parents
        {
            rl            = replog;                                                                                                            // used for error reporting
            _ObjectCount  = objcount;                                                                                                          // starting number for objects in this report; 0 other than for subreports
            _SourceLoader = sourceLoader;
            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 = XmlUtil.Integer(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 = Engine.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);
            }
        }