I have been trying to download a report as excel file for which i have set up the following view given below and a button called "Save as XLS" is used. I am retrieving the data for the report using a single named query . I have created a script for converting the table data which is a dataset which is as follows :
def runAction(self, event):
params = {"startDate":self.getSibling("ReportViewer").props.params.StartDate,"endDate":self.getSibling("ReportViewer").props.params.EndDate}
results = system.db.runNamedQuery("COMMON_RESOURCES","COMMON RESOURCES/MACHINES/CONVEYOR/Conveyor_Accumulation_test",params)
spreadsheet = system.dataset.toExcel(True, [results])
filePath = "C:\IGNITION\REPORTS\CONVEYOR_ACCUMULATION.xlsx"
system.file.writeFile(filePath, spreadsheet)
There is no error occurring in the log, but it does'nt write to the xcel file mentioned in the script. Am i doing something wrong with this