Thank you very much I didn't know that, still learning Js Reports.
I can confirm syntax for the helper call worked and managed to get the date inserted in the cell.
I consider your advise for future work.
Thank you very much again
Thank you very much I didn't know that, still learning Js Reports.
I can confirm syntax for the helper call worked and managed to get the date inserted in the cell.
I consider your advise for future work.
Thank you very much again
Hi all
I am trying to produce a csv report in js reports. I use the following code to create a template populate using the for loop. I have a function which returns todays date on js script function named "now" but when I call this function in relavant cell it doesn't render
Js Report:
Branch, Account Number, Sub Account Number, File Type, Created Date, Failure Reason, Extract Date
{{for reportData}}{{:branch}},{{:accountNumber}},{{:subAccountNumber}},{{:fileType}},{{:createdDate}},{{:failureReason}}, {{:now}}
{{/for}}
function now(){
return new Date()
}
data source:
{
"reportData": [
{
"branch": "108",
"accountNumber": "05056210",
"subAccountNumber": "03",
"fileType": "M",
"createdDate": "25 April 2024",
"failureReason": "Load reason null"
}
]
}
All other cells get populated with the respective data