Problem with Save Button on Easy Chart

I have come across a problem with my easy chart so far as when i select to view data for the last week and then export it to an excel sheet it is working fine but when i choose to view data for the last month i can view it on the easy chart but when i choose to export it the only bit of information i am getting in excel is this Text - ‘’

I have also an expression bound to the Tag History Resolution which is -

if(dateDiff({Root Container.ctg_Chart.startDate},{Root Container.ctg_Chart.endDate},“minute”)>10080,
dateDiff({Root Container.ctg_Chart.startDate},{Root Container.ctg_Chart.endDate},“minute”)/0.2,
if(dateDiff({Root Container.ctg_Chart.startDate},{Root Container.ctg_Chart.endDate},“minute”)>1440,
dateDiff({Root Container.ctg_Chart.startDate},{Root Container.ctg_Chart.endDate},“minute”)/0.2,
dateDiff({Root Container.ctg_Chart.startDate},{Root Container.ctg_Chart.endDate},“minute”)/0.2))

Is this what could be causing the problem.

I’m not sure if that expression is causing the problem, but it probably can’t be helping. The expression, as posted, is a lot of work for nothing as all the conditions do the same thing. But, I suspect that’s because the numbers are probably different that they were when it first written.

Using the first case as an example, a range of 10080 minutes (1 week) would result in a resolution of over 50000 points. Considering that the default for the chart is 300, that’s a big step up. If the chart is displaying the data, that’s a good sign… but maybe the CSV export isn’t handling so many points well?

Have you looked at the Java console for the client? Try going to Help>Diagnostics. There might be something there, maybe an out of memory. The text that you are getting is the UTF-8 marker rendered to ascii, so the file is being opened, and then nothing else is getting written.

You might try removing that expression and just setting the resolution to something a bit more modest, like 1000, and see if that helps.


Thanks for that colby,

You were correct, the error i was getting was as below so i just recalculated the expression and it is working great now and am getting far fewer points.

’ Exception in thread “AWT-EventQueue-0” java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuffer.append(Unknown Source)
at Source)
at Source)
at Source)
at com.inductiveautomation.ignition.common.script.builtin.DatasetUtilities.dataSetToExcel(
at com.inductiveautomation.factorypmi.application.script.builtin.ClientDatasetUtilities$3.writeToFile(
at com.inductiveautomation.ignition.client.script.ClientFileUtilities$CharFileWritingTask.writeToFile(
at com.inductiveautomation.factorypmi.application.script.builtin.FPMIFileUtilities.saveToFile(
at com.inductiveautomation.factorypmi.application.script.builtin.ClientDatasetUtilities.exportExcel(
at com.inductiveautomation.factorypmi.application.components.PMIEasyChart$EasyChart.exportExcel(
at com.inductiveautomation.factorypmi.application.components.PMIEasyChart.exportExcel(
at com.inductiveautomation.factorypmi.application.components.PMIEasyChart.exportExcel(
at com.inductiveautomation.factorypmi.application.components.PMIEasyChart.actionPerformed(
at com.inductiveautomation.factorypmi.application.components.util.ClickableIconButton.fireActionEvent(
at com.inductiveautomation.factorypmi.application.components.util.ClickableIconButton.setPress(
at com.inductiveautomation.factorypmi.application.components.util.ClickableIconButton.mouseReleased(
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)’
Thank you