void setContext(ITypeDescriptorContext context) { _metaConnection = context.Instance as MetaConnection; _metaEnum = context.Instance as MetaEnum; _metaTable = context.Instance as MetaTable; _metaColumn = context.Instance as MetaColumn; _metaJoin = context.Instance as MetaJoin; _reportView = context.Instance as ReportView; _reportOutput = context.Instance as ReportOutput; _reportSchedule = context.Instance as ReportSchedule; _parameter = context.Instance as Parameter; _security = context.Instance as SealSecurity; _emailDevice = context.Instance as OutputEmailDevice; }
void SetPDFRootViewHeaderCSS() { //Hide header by default for PDF... var headerCSS = Report.ExecutionView.CSS.FirstOrDefault(i => i.Name == "header"); if (headerCSS == null) { headerCSS = new Parameter() { Name = "header" }; Report.ExecutionView.CSS.Add(headerCSS); } if (string.IsNullOrEmpty(headerCSS.Value)) headerCSS.Value = "display:none;"; }
public void InitParameters(List<Parameter> configParameters, List<Parameter> parameters, bool resetValues) { foreach (var configParameter in configParameters) { Parameter parameter = parameters.FirstOrDefault(i => i.Name == configParameter.Name); if (parameter == null) { parameter = new Parameter() { Name = configParameter.Name, Value = configParameter.Value }; parameters.Add(parameter); } if (resetValues) parameter.Value = configParameter.Value; parameter.Enums = configParameter.Enums; parameter.Description = configParameter.Description; parameter.Type = configParameter.Type; parameter.UseOnlyEnumValues = configParameter.UseOnlyEnumValues; parameter.DisplayName = configParameter.DisplayName; parameter.ConfigValue = configParameter.Value; parameter.EditorLanguage = configParameter.EditorLanguage; parameter.Category = configParameter.Category; } //remove undefined parameters int index = parameters.Count; while (--index >= 0) if (!configParameters.Exists(i => i.Name == parameters[index].Name)) parameters.RemoveAt(index); }