Report Designer report to show cost code description if the group cost code is equal to yes.

I have a report in Report Designer that pulls data from JC - Transaction. I'd like a totaling line to return the cost code description if the group cost code is true. However, JC - Transaction does not contain the group cost code. I've played around with a few formulas looking to JC - Cost Code for the group cost code and the description, but I just can't get this to work. I saw some JC formulas for group cost codes, but these didn't work for me. Does anyone have any suggestions?