Пример #1
0
        internal void DeleteReport(Report report, bool DenyShared)
        {
            report.Validate(true);

            if (report.State == Report.StateEnum.Executing)
            {
                try
                {
                    report.CancelExecute();
                }
                catch
                {
                    // do nothing
                }
            }

            if (BeforeDeleteReport != null)
            {
                BeforeDeleteReport(report, EventArgs.Empty);
            }

            DeleteSharedReports(report);
            report._DeleteStates();
            report._Delete(DenyShared);

            report = null;
        }
Пример #2
0
        public void CancelExecutingReports()
        {
            // asyncronous at this moment
            while (this._executingReports.Count > 0)
            {
                Report report = (Report)this._executingReports.GetByIndex(0);
                report.CancelExecute();                 // it will reduce this._executingReports.Count
            }

            this._executingReports.Clear();
        }