Example #1
0
        private string GetReportProsps(ControlHost controlHost)
        {
            string       result  = string.Empty;
            ReportViewer control = controlHost.Content as ReportViewer;

            if (!this.IsPreview && control.Bindings.Count > 0)
            {
                Dictionary <string, string> dictProperty = control.GetPropertyBindValue();
                foreach (var item in control.Bindings)
                {
                    string bindPath     = item.Path == null ? "" : item.Path;
                    string bindProperty = item.Property == null ? "" : item.Property;
                    if (bindProperty.ToLower() == "value" && !string.IsNullOrEmpty(bindPath))
                    {
                        result = string.Format("at('rel:','{0}').direction(1)", bindPath);
                        break;
                    }
                }
            }
            return(result);
        }