This might work if I remove codegenproperties and then use Report_SYS.Define_Report_Layout_ conditionally. Will try and give an update.
Meanwhile let me know if there are any alternative ways of handling this.
UPDATE:
After some experiments, I found that Report_SYS.Define_Report_Layout_ only changes the layout name appear in the report print dialog but it does not change ‘Report Title’.
In addition, I could NOT even utilise Report_SYS.Define_Report_Text_ to set the Report Title dynamically.
So the solution is to use a report attribute in the header level of the report model/rdf and then replace standard ‘REPORT_TITLE’ with the defined report attribute in the rdl layout.