private void GetSql() { if (_context.ReportState == ReportStates.OutU8) { return; } RemoteDataHelper rdh = null; if (_context.FilterArgs != null && !string.IsNullOrEmpty(_context.FilterArgs.ClassName.Trim())) { if (_context.FilterArgs.DataSource.Type == CustomDataSourceTypeEnum.TemplateTable) { //_context.FilterArgs.DataSource.SQL = CustomDataSource.GetATableName(); _context.FilterArgs.DataSource.SQL = CustomDataSource.GetATableNameWithTaskId(_context.TaskID); } if (_context.ReportState == ReportStates.WebBrowse) { rdh = DefaultConfigs.GetRemoteHelper(); _context.FilterArgs = rdh.GetSql(_context.UserToken, _context.TaskID, _context.SubID, _context.FilterArgs); } else { rdh = new RemoteDataHelper(); rdh.GetSql(_context.FilterArgs); } } }
/// <summary> /// 以直接修改数据库的方式清除一个分组的运行时格式 /// </summary> public static void RemoveGroupStyle( string viewId, string groupId, string ufMetaCnnString) { RemoteDataHelper rdh = DefaultConfigs.GetRemoteHelper(); rdh.RemoveGroupStyle(viewId, groupId, ufMetaCnnString); }
public void OpenChartWizard(Chart chart) { ChartService _chartservice = null; string id = null; if (chart.Report.Type == ReportType.IndicatorReport) { id = "IndicatorChart"; Hashtable ctn = new Hashtable(); SimpleHashtable sht = new SimpleHashtable(); if (!string.IsNullOrEmpty(chart.DataSource)) { Section indicatordetail = chart.Report.Sections[SectionType.IndicatorDetail]; IIndicatorMetrix metrix = indicatordetail.Cells[chart.DataSource] as IIndicatorMetrix; if (metrix == null) { throw new Exception("非法图表数据源矩阵"); } sht.Add("__bcross__", metrix.CrossPart != null); if (metrix.IndicatorParts != null) { foreach (IPart indi in metrix.IndicatorParts) { sht.Add((indi as Cell).Caption, (indi as Cell).Name); } } } else { sht.Add("__bcross__", false); } ctn.Add(chart.Level, sht); _chartservice = new IndicatorChartService(chart.Report, ctn); } else { _chartservice = new ChartService(chart.Report); } ChartWizardAdapter _wizardadapter = new ChartWizardAdapter(_chartservice); if (_wizardadapter.ChartWizard.ShowDialog(_chartservice.GetSchemasAllLevel(chart.Level), chart.Level, id) == DialogResult.OK) { RemoteDataHelper rdh = DefaultConfigs.GetRemoteHelper(); rdh.SaveChartStrings(ClientReportContext.Login.UfMetaCnnString, chart.Report.ViewID, chart.Report.ChartStrings); } else { chart.Report.ChartStrings = null; } chart.ChartWizard = null; }