Making the Python code in the Report dynamic