I'm creating report creator and I need to change {!mergeField} in string to it's actual value, same as it works in email templates. For example 'Hello Mr.{!$User.LastName}' -> 'Hello Mr.Anderson'. How can I achieve it?
Updated
Long story short - I want to mimic work of email templates and for this I need to replace "{!property}" with it's value.
User enters some predefined tags and pass parameters to template that after can be used with certain record to generate pdf.