Best approach to accessing the data from a template
I would like to do some maths, counts, and other interrogation of the data from either template or a js file.
I am using the JSRender engine in all my reports the example below is using handlebars, when converting to JSRender it fails to work - most likely PEBCAK.
I found some examples on using scripts etc. the closest I have got was with this.
Which demonstrates one of my simple goals of making a count of the number of items in the JSON.
My two questions are :
Whats the recommended approach?
How do you go about referencing the data file for the report?
Perhaps this is what you are looking for?
Thanks for the reply. I've had a play with what you suggest but data seems to be nothing???
My goal is to have a data file for a report and in the template access that data directly.
From data file...
In report template
See what I mean ?