Example #1
0
        Expression _BookmarkLink;       // (string)
        //An expression that evaluates to the ID of a
        //bookmark within the report to go to when this
        //report item is clicked on.
        //(If no bookmark with this ID is found, the link
        //will not be included in the report. If the
        //bookmark is hidden, the link will go to the start
        //of the page the bookmark is on. If multiple
        //bookmarks with this ID are found, the link will
        //go to the first one)
        // Constructor
        internal Action(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Hyperlink    = null;
            _Drillthrough = null;
            _BookmarkLink = null;

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

                case "Drillthrough":
                    _Drillthrough = new Drillthrough(r, this, xNodeLoop);
                    break;

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

                default:
                    break;
                }
            }
        }
Example #2
0
        Expression _Hyperlink; // (URL)An expression that evaluates to the URL of the hyperlink

        #endregion Fields

        #region Constructors

        //An expression that evaluates to the ID of a
        //bookmark within the report to go to when this
        //report item is clicked on.
        //(If no bookmark with this ID is found, the link
        //will not be included in the report. If the
        //bookmark is hidden, the link will go to the start
        //of the page the bookmark is on. If multiple
        //bookmarks with this ID are found, the link will
        //go to the first one)
        // Constructor
        internal Action(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Hyperlink = null;
            _Drillthrough = null;
            _BookmarkLink = null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Hyperlink":
                        _Hyperlink = new Expression(r, this, xNodeLoop, ExpressionType.URL);
                        break;
                    case "Drillthrough":
                        _Drillthrough = new Drillthrough(r, this, xNodeLoop);
                        break;
                    case "BookmarkLink":
                        _BookmarkLink = new Expression(r, this, xNodeLoop, ExpressionType.String);
                        break;
                    default:
                        break;
                }
            }
        }