/// ----------------------------------------------------------------------------- /// <summary> /// UpdateSettings saves the modified settings to the Database /// </summary> /// <remarks> /// </remarks> /// <history> /// </history> /// ----------------------------------------------------------------------------- public override void UpdateSettings() { // Do not update report definition if the user is not a SuperUser if (UserInfo.IsSuperUser) { // Update the settings UpdateDataSourceSettings(); // Save the report definition ReportsController.UpdateReportDefinition(ModuleId, Report); } // Non-SuperUsers can change TabModuleSettings (display settings) // Update cache duration (0 => no caching) var duration = 0; if (chkCaching.Checked) { duration = int.Parse(txtCacheDuration.Text); } Report.CacheDuration = duration; Report.ShowInfoPane = chkShowInfoPane.Checked; Report.ShowControls = chkShowControls.Checked; Report.AutoRunReport = chkAutoRunReport.Checked; Report.ExportExcel = chkExportExcel.Checked; Report.TokenReplace = chkTokenReplace.Checked; // and Visualizer Settings Report.Visualizer = VisualizerDropDown.SelectedValue; Report.VisualizerSettings.Clear(); var settings = GetSettingsControlFromView(VisualizerSettings.GetActiveView()); if (settings != null) { settings.SaveSettings(Report.VisualizerSettings); } // Save the report view and clear the cache ReportsController.UpdateReportView(TabModuleId, Report); // refresh cache ModuleController.SynchronizeModule(ModuleId); ReportsController.ClearCachedResults(ModuleId); }
private void Awake() { Instance = this; }