Let's say you need to export 20 reports at the end of every month to Excel to certain folders and filenames. You could use Report Pac, Spread Reports, choose your report, select Output to Excel, set the folder, and click OK. The problem is you would have to repeat this 20 times. Using a Dashboard button, we can setup to export all 20 with one button.
1. Go to Design>Spread Reports and open your dashboard.
2. Find the Report Ids for the reports you want to export. You can do this one of two ways:
- In Design>Spread Reports use File>Open and view the reportids:
- In SQL Console run the following query: SELECT REPORTID,NAME FROM SPRPTS ORDER BY NAME
3. Enter is the ReportIDs, folder, and filename in a cell range. HINT: After you enter the report table, use Format, Row, Hide to hide the table from display in the dashboard. The table MUST be three columns with ID, folder then filename:
HINT: Notice the CONCAT Formula can be used to build the Folder or Filename. In this case we want to export the reports to a new folder every month so we use the formula CONCAT("E:\Monthly Reports\",DATE(1,"yyyy-mmm",1)) to return E:\Monthly Reports\2015-Jul. When reports are exported the folder(s) will be created if they do not alreay exist. Please verify user has rights to create files/folders in the export destination. UNC Paths are supported (\\server\Monthly Reports\)
4. Use Locate>Dashboard Element>Button.
6. Save report. Reload your dashboard (or set as your dashboard if creating new and restart WIMS). Click the button and reports will be output.