How to pass data from beforeRender function to script tag of HTML
-
Hi sir,
I want to create a tree structure inside a report. So i have create a sample tree data in beforeRender function but i dont konw how to assign this data from beforeRender to tree ie,
$(document).ready(function(){
$('#myTree').treeview({
data: treeData
});
});Here treeData is coming from beforeRender function
Playground url - https://playground.jsreport.net/w/reshmajacob93/145WI~1J
Can you please tell me how to do this?
-
Documentation:
https://jsreport.net/learn/templating-engines#tojs-data-Fixed workspace:
https://playground.jsreport.net/w/anon/najJs1J~
-
Thank you sir.
Also instead of adding external script file using script tag .How to refer those javascript file using folder path in report template?I have dowloaded some js file and i have added those file as asset inside template folder.But how to refer those files using folder path in report?