I am having a report that I need to do for a client. I have various SQL queries that return single values to populate text boxes on the report. A pareto bar chart is also required to visually represent these values. Instead of creating another SQL query I am trying to combine the data into data set in the follwing way:
> headers = ["name","value"] > rows = [["Baggers Loses",BaggersLoses],["Cartoner Loses",CartonerLoses], > ["Packer Loses",PackerLoses],["Conveyor Loses",ConveyorLoses]] > data = system.dataset.toDataSet(headers,rows) > newData = system.dataset.sort(data, "value",0) > #Select Chart object and apply newly created dataset to it > data['Data_Stops'] = newData
Where all the values are predefined in the script and “Data_Stops” is empty DataSet parameter. The error that I get is as follows:
WARN: Error invoking script.Traceback (most recent call last): File "<function:updateData>", line 60, in updateData TypeError: 'com.inductiveautomation.ignition.common.BasicDataset' object does not support item assignment
Anyone can guide me in the right direction where I am getting it wrong?