internal static DataElementOutputEnum GetStyle(string s, ReportLog rl)
        {
            DataElementOutputEnum rs;

            switch (s)
            {
                case "Output":
                    rs = DataElementOutputEnum.Output;
                    break;
                case "NoOutput":
                    rs = DataElementOutputEnum.NoOutput;
                    break;
                case "ContentsOnly":
                    rs = DataElementOutputEnum.ContentsOnly;
                    break;
                case "Auto":
                    rs = DataElementOutputEnum.Auto;
                    break;
                default:
                    if (rl != null)
                        rl.LogError(4, "Unknown DataElementOutput '" + s + "'.  Auto assumed.");
                    rs = DataElementOutputEnum.Auto;
                    break;
            }
            return rs;
        }
Ejemplo n.º 2
0
        internal static AxisTickMarksEnum GetStyle(string s, ReportLog rl)
        {
            AxisTickMarksEnum rs;

            switch (s)
            {
                case "None":
                    rs = AxisTickMarksEnum.None;
                    break;
                case "Inside":
                    rs = AxisTickMarksEnum.Inside;
                    break;
                case "Outside":
                    rs = AxisTickMarksEnum.Outside;
                    break;
                case "Cross":
                    rs = AxisTickMarksEnum.Cross;
                    break;
                default:
                    if (rl != null)
                        rl.LogError(4, "Unknown Axis Tick Mark '" + s + "'.  None assumed.");
                    rs = AxisTickMarksEnum.None;
                    break;
            }
            return rs;
        }
Ejemplo n.º 3
0
        internal static MarkerTypeEnum GetStyle(string s, ReportLog rl)
        {
            MarkerTypeEnum rs;

            switch (s)
            {
                case "None":
                    rs = MarkerTypeEnum.None;
                    break;
                case "Square":
                    rs = MarkerTypeEnum.Square;
                    break;
                case "Circle":
                    rs = MarkerTypeEnum.Circle;
                    break;
                case "Diamond":
                    rs = MarkerTypeEnum.Diamond;
                    break;
                case "Triangle":
                    rs = MarkerTypeEnum.Triangle;
                    break;
                case "Cross":
                    rs = MarkerTypeEnum.Cross;
                    break;
                case "Auto":
                    rs = MarkerTypeEnum.Auto;
                    break;
                default:
                    rl.LogError(4, "Unknown MarkerType '" + s + "'.  None assumed.");
                    rs = MarkerTypeEnum.None;
                    break;
            }
            return rs;
        }
Ejemplo n.º 4
0
        static internal ChartPaletteEnum GetStyle(string s, ReportLog rl)
        {
            ChartPaletteEnum p;

            switch (s)
            {
            case "Default":
                p = ChartPaletteEnum.Default;
                break;

            case "EarthTones":
                p = ChartPaletteEnum.EarthTones;
                break;

            case "Excel":
                p = ChartPaletteEnum.Excel;
                break;

            case "GrayScale":
                p = ChartPaletteEnum.GrayScale;
                break;

            case "Light":
                p = ChartPaletteEnum.Light;
                break;

            case "Pastel":
                p = ChartPaletteEnum.Pastel;
                break;

            case "SemiTransparent":
                p = ChartPaletteEnum.SemiTransparent;
                break;

            case "Patterned":     //GJL
                p = ChartPaletteEnum.Patterned;
                break;

            case "PatternedBlack":     //GJL
                p = ChartPaletteEnum.PatternedBlack;
                break;

            case "Custom":
                p = ChartPaletteEnum.Custom;
                break;

            default:
                rl.LogError(4, "Unknown ChartPalette '" + s + "'.  Default assumed.");
                p = ChartPaletteEnum.Default;
                break;
            }
            return(p);
        }
Ejemplo n.º 5
0
        static internal bool Boolean(string tf, ReportLog rl)
        {
            string low_tf = tf.ToLower();

            if (low_tf.CompareTo("true") == 0)
            {
                return(true);
            }
            if (low_tf.CompareTo("false") == 0)
            {
                return(false);
            }
            rl.LogError(4, "Unknown True/False value '" + tf + "'.  False assumed.");
            return(false);
        }
Ejemplo n.º 6
0
        internal static PlotTypeEnum GetStyle(string s, ReportLog rl)
        {
            PlotTypeEnum pt;

            switch (s)
            {
                case "Auto":
                    pt = PlotTypeEnum.Auto;
                    break;
                case "Line":
                    pt = PlotTypeEnum.Line;
                    break;
                default:
                    rl.LogError(4, "Unknown PlotType '" + s + "'.  Auto assumed.");
                    pt = PlotTypeEnum.Auto;
                    break;
            }
            return pt;
        }
        internal static ThreeDPropertiesDrawingStyleEnum GetStyle(string s, ReportLog rl)
        {
            ThreeDPropertiesDrawingStyleEnum ds;

            switch (s)
            {
                case "Cylinder":
                    ds = ThreeDPropertiesDrawingStyleEnum.Cylinder;
                    break;
                case "Cube":
                    ds = ThreeDPropertiesDrawingStyleEnum.Cube;
                    break;
                default:
                    rl.LogError(4, "Unknown DrawingStyle '" + s + "'.  Cube assumed.");
                    ds = ThreeDPropertiesDrawingStyleEnum.Cube;
                    break;
            }
            return ds;
        }
        internal static MatrixCellDataElementOutputEnum GetStyle(string s, ReportLog rl)
        {
            MatrixCellDataElementOutputEnum rs;

            switch (s)
            {
                case "Output":
                    rs = MatrixCellDataElementOutputEnum.Output;
                    break;
                case "NoOutput":
                    rs = MatrixCellDataElementOutputEnum.NoOutput;
                    break;
                default:
                    rl.LogError(4, "Unknown MatrixCellDataElementOutput '" + s + "'.  Output assumed.");
                    rs = MatrixCellDataElementOutputEnum.Output;
                    break;
            }
            return rs;
        }
Ejemplo n.º 9
0
        internal static SubtotalPositionEnum GetStyle(string s, ReportLog rl)
        {
            SubtotalPositionEnum rs;

            switch (s)
            {
                case "Before":
                    rs = SubtotalPositionEnum.Before;
                    break;
                case "After":
                    rs = SubtotalPositionEnum.After;
                    break;
                default:
                    rl.LogError(4, "Unknown SubtotalPosition '" + s + "'.  Before assumed.");
                    rs = SubtotalPositionEnum.Before;
                    break;
            }
            return rs;
        }
        internal static ChartElementOutputEnum GetStyle(string s, ReportLog rl)
        {
            ChartElementOutputEnum ceo;

            switch (s)
            {
                case "Output":
                    ceo = ChartElementOutputEnum.Output;
                    break;
                case "NoOutput":
                    ceo = ChartElementOutputEnum.NoOutput;
                    break;
                default:
                    rl.LogError(4, "Unknown ChartElementOutput '" + s + "'.  Output assumed.");
                    ceo = ChartElementOutputEnum.Output;
                    break;
            }
            return ceo;
        }
Ejemplo n.º 11
0
        internal static SortDirectionEnum GetStyle(string s, ReportLog rl)
        {
            SortDirectionEnum rs;

            switch (s)
            {
                case "Ascending":
                    rs = SortDirectionEnum.Ascending;
                    break;
                case "Descending":
                    rs = SortDirectionEnum.Descending;
                    break;
                default:
                    rl.LogError(4, "Unknown SortDirection '" + s + "'.  Ascending assumed.");
                    rs = SortDirectionEnum.Ascending;
                    break;
            }
            return rs;
        }
Ejemplo n.º 12
0
        static internal MarkerTypeEnum GetStyle(string s, ReportLog rl)
        {
            MarkerTypeEnum rs;

            switch (s)
            {
            case "None":
                rs = MarkerTypeEnum.None;
                break;

            case "Square":
                rs = MarkerTypeEnum.Square;
                break;

            case "Circle":
                rs = MarkerTypeEnum.Circle;
                break;

            case "Diamond":
                rs = MarkerTypeEnum.Diamond;
                break;

            case "Triangle":
                rs = MarkerTypeEnum.Triangle;
                break;

            case "Cross":
                rs = MarkerTypeEnum.Cross;
                break;

            case "Auto":
                rs = MarkerTypeEnum.Auto;
                break;

            default:
                rl.LogError(4, "Unknown MarkerType '" + s + "'.  None assumed.");
                rs = MarkerTypeEnum.None;
                break;
            }
            return(rs);
        }
        internal static MatrixLayoutDirectionEnum GetStyle(string s, ReportLog rl)
        {
            MatrixLayoutDirectionEnum rs;

            switch (s)
            {
                case "LTR":
                case "LeftToRight":
                    rs = MatrixLayoutDirectionEnum.LTR;
                    break;
                case "RTL":
                case "RightToLeft":
                    rs = MatrixLayoutDirectionEnum.RTL;
                    break;
                default:
                    rl.LogError(4, "Unknown MatrixLayoutDirection '" + s + "'.  LTR assumed.");
                    rs = MatrixLayoutDirectionEnum.LTR;
                    break;
            }
            return rs;
        }
Ejemplo n.º 14
0
        static internal SubtotalPositionEnum GetStyle(string s, ReportLog rl)
        {
            SubtotalPositionEnum rs;

            switch (s)
            {
            case "Before":
                rs = SubtotalPositionEnum.Before;
                break;

            case "After":
                rs = SubtotalPositionEnum.After;
                break;

            default:
                rl.LogError(4, "Unknown SubtotalPosition '" + s + "'.  Before assumed.");
                rs = SubtotalPositionEnum.Before;
                break;
            }
            return(rs);
        }
        static internal ChartElementOutputEnum GetStyle(string s, ReportLog rl)
        {
            ChartElementOutputEnum ceo;

            switch (s)
            {
            case "Output":
                ceo = ChartElementOutputEnum.Output;
                break;

            case "NoOutput":
                ceo = ChartElementOutputEnum.NoOutput;
                break;

            default:
                rl.LogError(4, "Unknown ChartElementOutput '" + s + "'.  Output assumed.");
                ceo = ChartElementOutputEnum.Output;
                break;
            }
            return(ceo);
        }
Ejemplo n.º 16
0
        static internal PlotTypeEnum GetStyle(string s, ReportLog rl)
        {
            PlotTypeEnum pt;

            switch (s)
            {
            case "Auto":
                pt = PlotTypeEnum.Auto;
                break;

            case "Line":
                pt = PlotTypeEnum.Line;
                break;

            default:
                rl.LogError(4, "Unknown PlotType '" + s + "'.  Auto assumed.");
                pt = PlotTypeEnum.Auto;
                break;
            }
            return(pt);
        }
Ejemplo n.º 17
0
        static internal SortDirectionEnum GetStyle(string s, ReportLog rl)
        {
            SortDirectionEnum rs;

            switch (s)
            {
            case "Ascending":
                rs = SortDirectionEnum.Ascending;
                break;

            case "Descending":
                rs = SortDirectionEnum.Descending;
                break;

            default:
                rl.LogError(4, "Unknown SortDirection '" + s + "'.  Ascending assumed.");
                rs = SortDirectionEnum.Ascending;
                break;
            }
            return(rs);
        }
        static internal MatrixCellDataElementOutputEnum GetStyle(string s, ReportLog rl)
        {
            MatrixCellDataElementOutputEnum rs;

            switch (s)
            {
            case "Output":
                rs = MatrixCellDataElementOutputEnum.Output;
                break;

            case "NoOutput":
                rs = MatrixCellDataElementOutputEnum.NoOutput;
                break;

            default:
                rl.LogError(4, "Unknown MatrixCellDataElementOutput '" + s + "'.  Output assumed.");
                rs = MatrixCellDataElementOutputEnum.Output;
                break;
            }
            return(rs);
        }
Ejemplo n.º 19
0
        static internal ThreeDPropertiesDrawingStyleEnum GetStyle(string s, ReportLog rl)
        {
            ThreeDPropertiesDrawingStyleEnum ds;

            switch (s)
            {
            case "Cylinder":
                ds = ThreeDPropertiesDrawingStyleEnum.Cylinder;
                break;

            case "Cube":
                ds = ThreeDPropertiesDrawingStyleEnum.Cube;
                break;

            default:
                rl.LogError(4, "Unknown DrawingStyle '" + s + "'.  Cube assumed.");
                ds = ThreeDPropertiesDrawingStyleEnum.Cube;
                break;
            }
            return(ds);
        }
Ejemplo n.º 20
0
        internal static TitlePositionEnum GetStyle(string s, ReportLog rl)
        {
            TitlePositionEnum rs;

            switch (s)
            {
                case "Center":
                    rs = TitlePositionEnum.Center;
                    break;
                case "Near":
                    rs = TitlePositionEnum.Near;
                    break;
                case "Far":
                    rs = TitlePositionEnum.Far;
                    break;
                default:
                    rl.LogError(4, "Unknown TitlePosition '" + s + "'.  Center assumed.");
                    rs = TitlePositionEnum.Center;
                    break;
            }
            return rs;
        }
Ejemplo n.º 21
0
        internal static QueryCommandTypeEnum GetStyle(string s, ReportLog rl)
        {
            QueryCommandTypeEnum rs;

            switch (s)
            {
                case "Text":
                    rs = QueryCommandTypeEnum.Text;
                    break;
                case "StoredProcedure":
                    rs = QueryCommandTypeEnum.StoredProcedure;
                    break;
                case "TableDirect":
                    rs = QueryCommandTypeEnum.TableDirect;
                    break;
                default:		// user error just force to normal TODO
                    rl.LogError(4, "Unknown Query CommandType '" + s + "'.  Text assumed.");
                    rs = QueryCommandTypeEnum.Text;
                    break;
            }
            return rs;
        }
Ejemplo n.º 22
0
        internal static TrueFalseAutoEnum GetStyle(string s, ReportLog rl)
        {
            TrueFalseAutoEnum rs;

            switch (s)
            {
                case "True":
                    rs = TrueFalseAutoEnum.True;
                    break;
                case "False":
                    rs = TrueFalseAutoEnum.False;
                    break;
                case "Auto":
                    rs = TrueFalseAutoEnum.Auto;
                    break;
                default:
                    rl.LogError(4, "Unknown True False Auto value of '" + s + "'.  Auto assumed.");
                    rs = TrueFalseAutoEnum.Auto;
                    break;
            }
            return rs;
        }
        internal static ThreeDPropertiesShadingEnum GetStyle(string s, ReportLog rl)
        {
            ThreeDPropertiesShadingEnum sh;

            switch (s)
            {
                case "None":
                    sh = ThreeDPropertiesShadingEnum.None;
                    break;
                case "Simple":
                    sh = ThreeDPropertiesShadingEnum.Simple;
                    break;
                case "Real":
                    sh = ThreeDPropertiesShadingEnum.Real;
                    break;
                default:
                    rl.LogError(4, "Unknown Shading '" + s + "'.  None assumed.");
                    sh = ThreeDPropertiesShadingEnum.None;
                    break;
            }
            return sh;
        }
Ejemplo n.º 24
0
        internal static LegendLayoutEnum GetStyle(string s, ReportLog rl)
        {
            LegendLayoutEnum rs;

            switch (s)
            {
                case "Column":
                    rs = LegendLayoutEnum.Column;
                    break;
                case "Row":
                    rs = LegendLayoutEnum.Row;
                    break;
                case "Table":
                    rs = LegendLayoutEnum.Table;
                    break;
                default:
                    if (rl != null)
                        rl.LogError(4, "Unknown LegendLayout '" + s + "'.  Column assumed.");
                    rs = LegendLayoutEnum.Column;
                    break;
            }
            return rs;
        }
Ejemplo n.º 25
0
        static internal MatrixLayoutDirectionEnum GetStyle(string s, ReportLog rl)
        {
            MatrixLayoutDirectionEnum rs;

            switch (s)
            {
            case "LTR":
            case "LeftToRight":
                rs = MatrixLayoutDirectionEnum.LTR;
                break;

            case "RTL":
            case "RightToLeft":
                rs = MatrixLayoutDirectionEnum.RTL;
                break;

            default:
                rl.LogError(4, "Unknown MatrixLayoutDirection '" + s + "'.  LTR assumed.");
                rs = MatrixLayoutDirectionEnum.LTR;
                break;
            }
            return(rs);
        }
Ejemplo n.º 26
0
        internal static DataElementStyleEnum GetStyle(string s, ReportLog rl)
        {
            DataElementStyleEnum rs;

            switch (s)
            {
                case "Auto":
                    rs = DataElementStyleEnum.Auto;
                    break;
                case "AttributeNormal":
                    rs = DataElementStyleEnum.AttributeNormal;
                    break;
                case "ElementNormal":
                    rs = DataElementStyleEnum.ElementNormal;
                    break;
                default:
                    if (rl != null)
                        rl.LogError(4, "Unknown DataElementStyle '" + s + "'.  AttributeNormal assumed.");
                    rs = DataElementStyleEnum.AttributeNormal;
                    break;
            }
            return rs;
        }
        static internal DataInstanceElementOutputEnum GetStyle(string s, ReportLog rl)
        {
            DataInstanceElementOutputEnum rs;

            switch (s)
            {
            case "Output":
                rs = DataInstanceElementOutputEnum.Output;
                break;

            case "NoOutput":
                rs = DataInstanceElementOutputEnum.NoOutput;
                break;

            default:
                if (rl != null)
                {
                    rl.LogError(4, "Unknown DataInstanceElementOutput '" + s + "'.  Output assumed.");
                }
                rs = DataInstanceElementOutputEnum.Output;
                break;
            }
            return(rs);
        }
Ejemplo n.º 28
0
        internal static ChartPaletteEnum GetStyle(string s, ReportLog rl)
        {
            ChartPaletteEnum p;

            switch (s)
            {
                case "Default":
                    p = ChartPaletteEnum.Default;
                    break;
                case "EarthTones":
                    p = ChartPaletteEnum.EarthTones;
                    break;
                case "Excel":
                    p = ChartPaletteEnum.Excel;
                    break;
                case "GrayScale":
                    p = ChartPaletteEnum.GrayScale;
                    break;
                case "Light":
                    p = ChartPaletteEnum.Light;
                    break;
                case "Pastel":
                    p = ChartPaletteEnum.Pastel;
                    break;
                case "SemiTransparent":
                    p = ChartPaletteEnum.SemiTransparent;
                    break;
                case "Patterned": //GJL
                    p = ChartPaletteEnum.Patterned;
                    break;
                case "PatternedBlack": //GJL
                    p = ChartPaletteEnum.PatternedBlack;
                    break;
                case "Custom":
                    p = ChartPaletteEnum.Custom;
                    break;
                default:
                    rl.LogError(4, "Unknown ChartPalette '" + s + "'.  Default assumed.");
                    p = ChartPaletteEnum.Default;
                    break;
            }
            return p;
        }
Ejemplo n.º 29
0
        internal static ChartSubTypeEnum GetStyle(string s, ReportLog rl)
        {
            ChartSubTypeEnum st;

            switch (s)
            {
                case "Plain":
                    st = ChartSubTypeEnum.Plain;
                    break;
                case "Stacked":
                    st = ChartSubTypeEnum.Stacked;
                    break;
                case "PercentStacked":
                    st = ChartSubTypeEnum.PercentStacked;
                    break;
                case "Smooth":
                    st = ChartSubTypeEnum.Smooth;
                    break;
                case "Exploded":
                    st = ChartSubTypeEnum.Exploded;
                    break;
                case "Line":
                    st = ChartSubTypeEnum.Line;
                    break;
                case "SmoothLine":
                    st = ChartSubTypeEnum.SmoothLine;
                    break;
                case "HighLowClose":
                    st = ChartSubTypeEnum.HighLowClose;
                    break;
                case "OpenHighLowClose":
                    st = ChartSubTypeEnum.OpenHighLowClose;
                    break;
                case "Candlestick":
                    st = ChartSubTypeEnum.Candlestick;
                    break;
                default:
                    rl.LogError(4, "Unknown ChartSubType '" + s + "'.  Plain assumed.");
                    st = ChartSubTypeEnum.Plain;
                    break;
            }
            return st;
        }
Ejemplo n.º 30
0
        RSize _Width; // Width of the report

        #endregion Fields

        #region Constructors

        // report has no parents
        // Constructor
        internal ReportDefn(XmlNode xNode, ReportLog replog, string folder, NeedPassword getpswd, int objcount, IRdlSourceLoader sourceLoader)
        {
            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);
        }
Ejemplo n.º 31
0
        internal static ImageSizingEnum GetStyle(string s, ReportLog rl)
        {
            ImageSizingEnum rs;

            switch (s)
            {
                case "AutoSize":
                    rs = ImageSizingEnum.AutoSize;
                    break;
                case "Fit":
                    rs = ImageSizingEnum.Fit;
                    break;
                case "FitProportional":
                    rs = ImageSizingEnum.FitProportional;
                    break;
                case "Clip":
                    rs = ImageSizingEnum.Clip;
                    break;
                default:
                    if (rl != null)
                        rl.LogError(4, "Unknown ImageSizing '" + s + "'.  AutoSize assumed.");

                    rs = ImageSizingEnum.AutoSize;
                    break;
            }
            return rs;
        }
Ejemplo n.º 32
0
        internal static LegendPositionEnum GetStyle(string s, ReportLog rl)
        {
            LegendPositionEnum rs;

            switch (s)
            {
                case "TopLeft":
                    rs = LegendPositionEnum.TopLeft;
                    break;
                case "TopCenter":
                    rs = LegendPositionEnum.TopCenter;
                    break;
                case "TopRight":
                    rs = LegendPositionEnum.TopRight;
                    break;
                case "LeftTop":
                    rs = LegendPositionEnum.LeftTop;
                    break;
                case "LeftCenter":
                    rs = LegendPositionEnum.LeftCenter;
                    break;
                case "LeftBottom":
                    rs = LegendPositionEnum.LeftBottom;
                    break;
                case "RightTop":
                    rs = LegendPositionEnum.RightTop;
                    break;
                case "RightCenter":
                    rs = LegendPositionEnum.RightCenter;
                    break;
                case "RightBottom":
                    rs = LegendPositionEnum.RightBottom;
                    break;
                case "BottomRight":
                    rs = LegendPositionEnum.BottomRight;
                    break;
                case "BottomCenter":
                    rs = LegendPositionEnum.BottomCenter;
                    break;
                case "BottomLeft":
                    rs = LegendPositionEnum.BottomLeft;
                    break;
                default:
                    if (rl != null)
                        rl.LogError(4, "Unknown LegendPosition '" + s + "'.  RightTop assumed.");
                    rs = LegendPositionEnum.RightTop;
                    break;
            }
            return rs;
        }
Ejemplo n.º 33
0
        internal static DataLabelPositionEnum GetStyle(string s, ReportLog rl)
        {
            DataLabelPositionEnum dlp;

            switch (s)
            {
                case "Auto":
                    dlp = DataLabelPositionEnum.Auto;
                    break;
                case "Top":
                    dlp = DataLabelPositionEnum.Top;
                    break;
                case "TopLeft":
                    dlp = DataLabelPositionEnum.TopLeft;
                    break;
                case "TopRight":
                    dlp = DataLabelPositionEnum.TopRight;
                    break;
                case "Left":
                    dlp = DataLabelPositionEnum.Left;
                    break;
                case "Center":
                    dlp = DataLabelPositionEnum.Center;
                    break;
                case "Right":
                    dlp = DataLabelPositionEnum.Right;
                    break;
                case "BottomRight":
                    dlp = DataLabelPositionEnum.BottomRight;
                    break;
                case "Bottom":
                    dlp = DataLabelPositionEnum.Bottom;
                    break;
                case "BottomLeft":
                    dlp = DataLabelPositionEnum.BottomLeft;
                    break;
                default:
                    rl.LogError(4, "Unknown DataLablePosition '" + s + "'.  Auto assumed.");
                    dlp = DataLabelPositionEnum.Auto;
                    break;
            }
            return dlp;
        }
Ejemplo n.º 34
0
 internal static bool Boolean(string tf, ReportLog rl)
 {
     string low_tf = tf.ToLower();
     if (low_tf.CompareTo("true") == 0)
         return true;
     if (low_tf.CompareTo("false") == 0)
         return false;
     rl.LogError(4, "Unknown True/False value '" + tf + "'.  False assumed.");
     return false;
 }
Ejemplo n.º 35
0
        static internal LegendPositionEnum GetStyle(string s, ReportLog rl)
        {
            LegendPositionEnum rs;

            switch (s)
            {
            case "TopLeft":
                rs = LegendPositionEnum.TopLeft;
                break;

            case "TopCenter":
                rs = LegendPositionEnum.TopCenter;
                break;

            case "TopRight":
                rs = LegendPositionEnum.TopRight;
                break;

            case "LeftTop":
                rs = LegendPositionEnum.LeftTop;
                break;

            case "LeftCenter":
                rs = LegendPositionEnum.LeftCenter;
                break;

            case "LeftBottom":
                rs = LegendPositionEnum.LeftBottom;
                break;

            case "RightTop":
                rs = LegendPositionEnum.RightTop;
                break;

            case "RightCenter":
                rs = LegendPositionEnum.RightCenter;
                break;

            case "RightBottom":
                rs = LegendPositionEnum.RightBottom;
                break;

            case "BottomRight":
                rs = LegendPositionEnum.BottomRight;
                break;

            case "BottomCenter":
                rs = LegendPositionEnum.BottomCenter;
                break;

            case "BottomLeft":
                rs = LegendPositionEnum.BottomLeft;
                break;

            default:
                if (rl != null)
                {
                    rl.LogError(4, "Unknown LegendPosition '" + s + "'.  RightTop assumed.");
                }
                rs = LegendPositionEnum.RightTop;
                break;
            }
            return(rs);
        }
Ejemplo n.º 36
0
        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);
            }
        }