Esempio n. 1
0
        internal OlapReport(decimal ID, User Owner) : base(ID, Owner)
        {
            _schema = new Schema();
            _axes   = new Olap.Axes(this.Schema);

            this.Axes.BeforeChangeItem += new EventHandler(OnBeforeChangeAxesItem);

            if (ID == 0)          //if new
            {
                FI.Common.DataAccess.IOlapReportsDA dacObj = DataAccessFactory.Instance.GetOlapReportsDA();

                string ReportXml    = "<R></R>";
                string OpenNodesXml = "<NODES></NODES>";
                _graphOptions = GraphOptionsEnum.Pivot; // graph pivot option on by default

                _id = dacObj.InsertReport(
                    _owner.ID, 0, 0, "New Report", "", this.IsSelected,
                    (byte)this.GraphType, this.GraphTheme, (int)this.GraphOptions, this.GraphWidth, this.GraphHeight, this.GraphNum1,
                    ReportXml, OpenNodesXml);

                // flags
                _isProxy = false;
                _isDirty = false;
            }
        }
Esempio n. 2
0
        override protected internal void _Open()
        {
            short  sharing = 0;
            short  maxSubscriberSharing = 0;
            string reportXml            = "";
            string openNodesXml         = "";
            string schemaXml            = "";
            byte   graphType            = 0;
            int    graphOptions         = 0;

            //bool fakeIsSelected=false;

            FI.Common.DataAccess.IOlapReportsDA dacObj = DataAccessFactory.Instance.GetOlapReportsDA();
            dacObj.ReadReport(_owner.ID, this.ID,
                              ref this._parentReportId,
                              ref this._name,
                              ref this._description,
                              ref sharing,
                              ref maxSubscriberSharing,
                              ref this._isSelected,   //ref fakeIsSelected,
                              ref graphType,
                              ref _graphTheme,
                              ref graphOptions,
                              ref _graphWidth,
                              ref _graphHeight,
                              ref _graphNum1,
                              ref Schema.Server,
                              ref Schema.Database,
                              ref Schema.Cube,
                              ref reportXml,
                              ref schemaXml,
                              ref openNodesXml,
                              ref _undoStateCount,
                              ref _redoStateCount);

            this._sharing = (Report.SharingEnum)sharing;
            this._maxSubscriberSharing = (Report.SharingEnum)maxSubscriberSharing;
            this._graphType            = (GraphTypeEnum)graphType;
            this._graphOptions         = (GraphOptionsEnum)graphOptions;

            //dacObj.UpdateReportHeader(_owner.ID , this.ID, this._parentReportId , (byte)this.SharingStatus , this.Name , this.Description , this.IsSelected , 0, "");

            this.Schema.OpenNodesFromXml(openNodesXml);             // before other loads, cause then other loads will fetch members depending on open nodes
            LoadFromXmlSchema(schemaXml);
            LoadFromXml(reportXml);
        }