I use the below custom function to convert the numeric value in my Risk column to its text equivalent.
= ReturnRiskLeveltext(Fields.RiskLevel)
However, in the footer row I wish to display an Average Risk Level
Would be correct because it returns a 2. however, I wish to again display the Text equivalent.
Throws an error 'An error has occurred while processing TextBox 'textBox11': The expression contains undefined function call ReturnRiskLeveltext().'
Ideas?
= ReturnRiskLeveltext(Fields.RiskLevel)
public static string ReturnRiskLeveltext(int rId){ using (DataEntities ctx = new DataEntities()) { var RiskLevel = ctx.RiskLevels.Where(x => x.RiskLevelID == rId).SingleOrDefault(); return RiskLevel.Level; }}However, in the footer row I wish to display an Average Risk Level
= Avg(Fields.RiskLevel)Would be correct because it returns a 2. however, I wish to again display the Text equivalent.
= ReturnRiskLeveltext(Avg(Fields.RiskLevel))Throws an error 'An error has occurred while processing TextBox 'textBox11': The expression contains undefined function call ReturnRiskLeveltext().'
Ideas?