I'm doing calculations in a Repeat. The CrackLength calculation works fine. The SpallArea doesn't. I'm sure it has something to do with the syntax of the calculation for the hidden field SpallArea. What I need is the product of the Length times the Width for areas of spalling, i.e., SpallArea:
begin group Summary Summary of Cracks
decimal TotalLength Total Length of Cracks sum(${CrackLength})
decimal TotalArea Total Area of Spalling sum(${SpallArea})
end group
The repeat looks something like:
begin repeat Surface Surface Condition
begin group Surface1 </>
decimal Length Length
decimal Width Width
select_one DamageType Type [NOTE: This would be cracking, spalling, etc.]
select_one Recommendation Recommendation [NOTE: This would be Monitor, Repair, No Action]
hidden CrackLength Calculation: if(selected(${DamageType},'cracking') and selected(${Recommendation},'Repair'),${Length},0) bind::type: decimal
hidden SpallArea Calculation: if(selected($(DamageType),'spalling') and selected(${Recommendation},'Repair'), ${Length*Width}, 0) bind::type decimal
end group
end repeat