Status | ||||
---|---|---|---|---|
|
You can add a button to the Dashboard that will download the dashboard data into a file. The button and what it does when clicked is defined by a calculation logic.
To render the button in the Dashboard portlet, use the DashboardController method addDownloadButton
in the calculation logic. You can add URL parameters determining the output format and the name of the file.
...
Often, you will need to use a variable in the fileName
URL parameter to make the file name generation dynamic:
Code Block |
---|
def FileName = 'MyDownloadedFile' //or more typically a dynamically generated file name controller.addDownloadButton('Download Excel','/formulamanager.executeformula/JJ_dashboard_export_logic?output=xls&fileName=' + FileName) |
Note:
If no file name URL parameter is set, the name consists of the (unique) name of the logic and the time stamp.
The file name cannot contain the following characters and they will be replaced by an underscore when the file is generated:
\ / | : " * ? < > .
All special characters will be replaced with regular characters (e.g., ö, á → o, a).