I've just resolved my problem. The answer was to remove the single quotes (Chr(39)) from around the numeric variable I was setting the function to. Instead of this:
lrptInvoice.DataDefinition.FormulaFields("ShopSuppliesAmount").Text = Chr(39) & mdecShopSuppliesAmount.ToString & Chr(39)
I should have coded this:
lrptInvoice.DataDefinition.FormulaFields("ShopSuppliesAmount").Text = mdecShopSuppliesAmount.ToString
The report is working perfectly now.