protected MdQueryResult CreateEmptyResult(MdQuery q) { var result = new MdQueryResult(); foreach (var dim in q.Dimensions) { var dimModel = model.Dimensions.Single(p => p.Name == dim); result.Headers.Add(new HeaderCell(dim, dimModel.Caption, dimModel.Type, HeaderType.DimensionHeader)); } foreach (var measure in q.Measures) { var measureModel = model.Measures.Single(p => p.Name == measure); result.Headers.Add(new HeaderCell(measure, measureModel.Caption, measureModel.Type, HeaderType.MeasureHeader)); } return(result); }
protected MdQueryResult CreateEmptyResult(MdQuery q) { var result = new MdQueryResult(); foreach (var dim in q.Dimensions) { var dimModel = model.Dimensions.Single(p => p.Name == dim); result.Headers.Add(new HeaderCell(dim, dimModel.Caption, dimModel.Type, HeaderType.DimensionHeader)); } foreach (var measure in q.Measures) { var measureModel = model.Measures.Single(p => p.Name == measure); result.Headers.Add(new HeaderCell(measure, measureModel.Caption, measureModel.Type, HeaderType.MeasureHeader)); } return result; }