I am using Helical Insight 3.1. In the PDF exports I would also like to include the “current date” as well so that people can know on which date that specific dashboard/report has been printed. How can something like that can be done?
Thank You.
Hello Marc,
Open the report/dashboard and then navigate to PDF Options. In that go to “Add Frame” and in that there is “Script” option. In that script option you can write a Javascript code like below which will fetch the current date and print it.
var today = new Date();
var date = today.getDate()+'-'+(today.getMonth()+1)+'-'+today.getFullYear()
document.getElementById("main").innerHTML = date
For further reading refer to this blog
In a similar way you can also print Month Name (rather than month number) using the below code
var months1 = ["JAN", "FEB", "MAR","APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
var current_datetime1 = new Date()
var formatted_date1 = current_datetime1.getDate() + "-" + months1[current_datetime1.getMonth()] + "-" + current_datetime1.getFullYear()
document.getElementById("main").innerHTML = formatted_date1