/// <summary>
        /// Собирает данные и сохраняет отчет в указанное место
        /// </summary>
        private string SaveTagsReport(string pathToSave, string reportName, DSRouterTagsReportSettings reportSettings)
        {
            string result = null;

            // Получаем тренды
            var trends = GetTrends(reportSettings.Tags, reportSettings.StartDateTime, reportSettings.EndDateTime);
            if (trends == null || trends.Count == 0)
                return null;

            // Если надо, то приводим тренды к единому шагу
            Dictionary<DateTime, Tuple<object, object, object, object>> trendsWithFixStep = null;
            if (reportSettings.Interval != 0)
            {
                trendsWithFixStep = GetTrendsWithFixStep(trends, reportSettings.Interval, reportSettings.StartDateTime, reportSettings.EndDateTime);
            }

            // Заполняем DataSet
            var dataSource = FillDataSet(null, trends, trendsWithFixStep);

            #region Формирование отчета

            string reportTemplateName = String.IsNullOrWhiteSpace(reportSettings.ReportTamplateName) ? "TagsReport" : reportSettings.ReportTamplateName;

            var report = new Report(reportTemplateName);
            report.SetDataSource(dataSource);

            report.SaveReportFile(pathToSave, reportName, reportSettings.ReportExtension.ToString());

            result = Path.Combine(pathToSave, reportName + "." + reportSettings.ReportExtension.ToString());

            #endregion

            return result;
        }
        /// <summary>
        /// Собирает данные и сохраняет отчет в указанное место
        /// </summary>
        private string SaveEventsReport(string pathToSave, string reportName, DSRouterEventsReportSettings reportSettings)
        {
            string result = null;

            #region Получение данных

            var dsGuid = reportSettings.DsGuid;
            var deviceGuid = reportSettings.DeviceGuid;

            var events = (this as IDSRouter).GetEvents(reportSettings.StartDateTime, reportSettings.EndDateTime,
                false, false, true, new List<Tuple<ushort, uint>> { new Tuple<ushort, uint>(dsGuid, deviceGuid) });

            if (events == null)
                return null;

            #endregion

            #region Подготовка данных

            var dataSource = FillDataSet(events, null, null);

            #endregion

            #region Формирование отчета

            string reportTemplateName = String.IsNullOrWhiteSpace(reportSettings.ReportTamplateName) ? "EventsReport" : reportSettings.ReportTamplateName;

            var report = new Report(reportTemplateName);
            report.SetDataSource(dataSource);

            report.SaveReportFile(pathToSave, reportName, reportSettings.ReportExtension.ToString());

            result = Path.Combine(pathToSave, reportName + "." + reportSettings.ReportExtension.ToString());

            #endregion

            return result;
        }