Thank you very much for the sample code. It is working well.
I added a new .cs report named Questions.cs under Report folder. I am getting error "
Error from report directive:Unable to get report parameters.<br/>Report 'Reports%2FQuestions.cs' cannot be resolved".
In the example code it is invoking .trdx files; not .cs files
Added below code in script.js
title: "Questions Report",
Please find the attached, sample code with my changes