private void openReport(NameValueCollection nvc) { string id = nvc["id"]; if (string.IsNullOrEmpty(id)) { return; } SCDirector director = new SCDirector("master", "en"); if (director.ObjectExists(id)) { ReportItem rItem = director.GetObjectByIdentifier <ReportItem>(id); foreach (string key in nvc.Keys) { if (key.Contains("^")) { string[] item_parameter = key.Split('^'); Guid g = new Guid(item_parameter[0]); ReferenceItem ri = rItem.FindItem(g); if (ri != null) { ri.SetAttributeValue(item_parameter[1], nvc[key]); } } } Current.Context.ReportItem = rItem; Current.Context.Report = null; updateInterface(null); //updateParameters(null); //new ReportRunner().RunCommand(null); } }
public static ReportItem CreateFromParameters(NameValueCollection nvc) { Assert.IsNotNull(nvc, "Incorrect Parameters Format"); var id = nvc["id"]; if (id == null) { return(null); } var director = new SCDirector("master", "en"); if (!director.ObjectExists(id)) { throw new Exception("Report has been deleted"); } var reportItem = director.GetObjectByIdentifier <ReportItem>(id); foreach (string key in nvc.Keys) { if (key.Contains("^")) { var item_parameter = key.Split('^'); var guid = new Guid(item_parameter[0]); var ri = reportItem.FindItem(guid); if (ri != null) { ri.SetAttributeValue(item_parameter[1], nvc[key]); } } } return(reportItem); }
public static ReportItem CreateFromParameters(NameValueCollection nvc) { Assert.IsNotNull(nvc, "Incorrect Parameters Format"); var id = nvc["id"]; if (id == null) return null; var director = new SCDirector("master", "en"); if (!director.ObjectExists(id)) throw new Exception("Report has been deleted"); var reportItem = director.GetObjectByIdentifier<ReportItem>(id); foreach (string key in nvc.Keys) { if (key.Contains("^")) { var item_parameter = key.Split('^'); var guid = new Guid(item_parameter[0]); var ri = reportItem.FindItem(guid); if (ri != null) { ri.SetAttributeValue(item_parameter[1], nvc[key]); } } } return reportItem; }
private void openReport(NameValueCollection nvc) { string id = nvc["id"]; if (string.IsNullOrEmpty(id)) return; SCDirector director = new SCDirector("master", "en"); if (director.ObjectExists(id)) { ReportItem rItem = director.GetObjectByIdentifier<ReportItem>(id); foreach (string key in nvc.Keys) { if (key.Contains("^")) { string[] item_parameter = key.Split('^'); Guid g = new Guid(item_parameter[0]); ReferenceItem ri = rItem.FindItem(g); if (ri != null) { ri.SetAttributeValue(item_parameter[1], nvc[key]); } } } Current.Context.ReportItem = rItem; Current.Context.Report = null; updateInterface(null); //updateParameters(null); //new ReportRunner().RunCommand(null); } }