Piotror,
I'm not Brian, but I think I can answer your question.
You already have the formula. Click on the formula button, name the formula, then enter:
If {fieldname} > CurrentDate then
StringVar txtName := "XYZ"
else
StringVar txtName := "ABC"
Save and close the formula window. Find the formula on the Fields list and drag it onto your report.