I have a custom field TotalCost using cast('' as signed)
In Row_Rendered I'm populating TotalCost by counting the items in an adjacent field, then multiplying that by another field's value.
I need TotalCost to display in currency format, so i set the field's Format attribute to Currency.
If I use this in Row_Rendered:
$this->TotalCost->CurrentValue=$totalcost;
the field correctly displays as a currency field but $totalcost isn't calculated, so it always shows as €0,00
If I use this in Row_Rendered:
$this->TotalCost->ViewValue=$totalcost;
the calculation is correct but it's displayed as a whole number not as currency.
How can I force TotalCost to show as currency when using ViewValue ?