Using a data source which I added using code like this (in case that is the cause):
Code: Select all
var queryResult = DatabaseInformationLogic.AdHocReportQuery(AddOnHelper, AddOnHelper.StorageHelper.ReadFile(queryFilename), maxRows: 0);
result.RegData("Data", QueryResultToDataSet(queryResult));
result.Dictionary.Synchronize();
The URL for the Preview Action is not called at the time of the exception so it is not caused by that.
I have determined that the cause is that while merging options, it is iterating over each character in the "scriptUrl" string. This string is null in one of the two sets of options. Also I suspect it's not actually meant to iterate over this string but was intended to iterate over the options recursively.
Code: Select all
Uncaught TypeError: Cannot read property '0' of null
at StiJsViewer.mergeOptions (stimulsoft.viewer.js:9)
at StiJsViewer.mergeOptions (stimulsoft.viewer.js:9)
at new StiJsViewer (stimulsoft.viewer.js:7)
at createViewer (__designer-event?queryId=0903085017SEAM&stiweb_component=Designer&stiweb_action=Resource&stiweb_cachemode=cache&stiweb_version=2018.2.2&stiweb_data=DesignerScripts:27131)
at StiMobileDesigner.ExecuteAction (__designer-event?queryId=0903085017SEAM&stiweb_component=Designer&stiweb_action=Resource&stiweb_cachemode=cache&stiweb_version=2018.2.2&stiweb_data=DesignerScripts:27144)
at HTMLDivElement.button.action (__designer-event?queryId=0903085017SEAM&stiweb_component=Designer&stiweb_action=Resource&stiweb_cachemode=cache&stiweb_version=2018.2.2&stiweb_data=DesignerScripts:37932)
at HTMLDivElement.button.onclick (__designer-event?queryId=0903085017SEAM&stiweb_component=Designer&stiweb_action=Resource&stiweb_cachemode=cache&stiweb_version=2018.2.2&stiweb_data=DesignerScripts:20443)