public static Dictionary <string, string> GetDataSets(rdlReport doc) { var dataSets = new Dictionary <string, string>(); if (doc.DataSets != null && doc.DataSets.DataSets != null) { foreach (var node in doc.DataSets.DataSets) { if (node == null) { continue; } if (string.IsNullOrEmpty(node.Name)) { continue; } if (node.Query == null || string.IsNullOrEmpty(node.Query.CommandText)) { continue; } var name = node.Name; var query = node.Query.CommandText; dataSets.Add(name, query); } } return(dataSets); }
public static IEnumerable <rdlReportParameter> GetParameters(rdlReport doc) { if (doc == null) { return(new rdlReportParameter[0]); } if (doc.ReportParameters == null) { return(new rdlReportParameter[0]); } if (doc.ReportParameters.ReportParameter == null) { return(new rdlReportParameter[0]); } return(doc.ReportParameters.ReportParameter); }