Exemple #1
0
        public string SaveReport(string name, GrapeCity.ActiveReports.PageReportModel.Report report, bool isTemporary = false)
        {
            var service = _serviceProvider.ResolveRequired <IReportRepository>();
            var data    = ReportConverter.ToXml(report);

            return(service.Create(name, report.IsFixedPageReport ? "FPL" : "CPL", data, new ReportRepositoryOptions()
            {
                IsTemporary = isTemporary
            }));
        }
Exemple #2
0
        public string UpdateReport(string id, GrapeCity.ActiveReports.PageReportModel.Report report)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(null);
            }

            if (id.Length > 5 && id.EndsWith(".rdlx", StringComparison.OrdinalIgnoreCase))
            {
                id = id.Substring(0, id.Length - 5);
            }

            var service = _serviceProvider.ResolveRequired <IReportRepository>();
            var data    = ReportConverter.ToXml(report);

            return(service.Update(id, report.IsFixedPageReport ? "FPL" : "CPL", data));
        }