Query-Report print format

I am making a print format for a query report. How do I access data of the query-report in the html file using the js templating?

I tried using data[i].field_name but it doesn’t show the data within a loop with various tags
{% for(var i=0, l=data.length; i<l; i++) { %}


{%= i+1 %}
{%= doc.name %}
{%= data.age %}
{%= data[i].employee_name %}

{% } %}

It does not show the data. Any help will be appreciated. In fact if there are any sample Query reports html files, do share URL.

Anybody having example query report + print format samples?

I had procrastinated for a while about reports but the time to yield results has come, so I am experimenting with them.
So far I have only modified the actual reports in a develop version.
I have also copied the same report structure to my own application, so that the report itself is visible in the app. Each report will have the equivalent of one and only one print format for it. Until I can figure out how to choose print format for any report, say, if there are 4 html print formats available.

I suggest you check existing reports in each module for reference, they have been invaluable to me.