public static void ExportCurrentForm(DBGrid grid, ReportExportFormat format) { if (_reporter != null) { _reporter.ExportCurrentForm(grid, format); } }
public static void DesignCurrentForm(DBGrid grid) { if (_reporter != null) { _reporter.DesignCurrentForm(grid); } }
public static void Design(DBGrid grid) { if (_reporter != null) { _reporter.Design(grid); } }
public static void PrintCurrentForm(DBGrid grid) { if (_reporter != null) { _reporter.PrintCurrentForm(grid); } }
public DBGridParam(JMXSchema schema, DBGrid grid) { _grid = grid; int count = schema.Parameters.Count; List <WinFormItem> listItems = new List <WinFormItem>(count); foreach (var p in schema.Parameters) { WinFormItem item = new WinFormItem(p.ParamName) { Caption = p.Name, DataType = MdbTypeMap.GetType(p.DataType), Width = p.DisplayWidth, DataSize = p.Width, Format = p.Format, SuperForm = p.SuperForm, SuperMethod = p.SuperMethod, ConstName = p.ConstName, PresentationType = Type.GetType(p.PresentationType), Value = p.DefaultValue }; if (p.ListData.Count > 0) { for (int i = 0; i < p.ListData.Count; i++) { item.Add(new WinFormItem(p.ListItems[i]) { Caption = p.ListItems[i], DataType = item.DataType, Value = p.ListData[i] }); } item.Mask = "lock"; } //!!! Добавить добавление констант в расширениях (class UserConstants.GetConst(), AddConst() switch (item.ConstName.ToLower()) { case "bs_datecurrent": item.Value = vbo.Date(); break; case "bs_datestart": item.Value = rth.DateStart; break; case "bs_datefinish": item.Value = rth.DateFinish; break; case "bs_username": item.Value = PathHelper.UserName; break; default: if (item.ConstName.Left(1) == "=") { //!!! item.Value = Evaluator.Eval(item.ConstName.Substring(1), schema); } else { //!!! //string localSetting = schema[path + "ConstName"]; //if (localSetting.IndexOf(vbo.chrSep) > -1) // localSetting = dbs.GetSetting(localSetting); //else // localSetting = dbs.GetSetting(setPath + localSetting); //if (string.IsNullOrEmpty(localSetting)) // localSetting = dbs.GetSetting(schema["ObjectName"] + vbo.chrSep + "Setup" + vbo.chrSep + // schema[path + "ConstName"]); //if (!string.IsNullOrEmpty(localSetting)) // item.Value = localSetting; } break; } if (item.OriginalValue == null && _grid.ParentRow != null && !string.IsNullOrEmpty(p.FieldName)) { try { item.Value = _grid.ParentRow[p.FieldName]; } finally { if (vbo.IsEmpty(item.Value)) { item.Value = null; } } } if ((item.Visible = (vbo.IsEmpty(item.Value))) && _paramCash.ContainsKey(item.Name)) { item.Value = _paramCash[item.Name]; } listItems.Add(item); } _items = listItems.ToArray(); }