If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Scriptable Reports: DataStore object data values limited?

Started by dougp, 10 Jul 2017 12:00:51 PM

Previous topic - Next topic

dougp

Using:
Cognos 11.0.4
MS SQL Server
geometry.STAsText() function


I have had success with JavaScript in Cognos 11.0.4 using RequireJS and AMD.  Now I'm trying to draw data on a map.  I have created a script that uses OpenLayers.  It successfully draws points, but when I try to get it to draw shapes, using WKT, it fails.  The problem is in the data contained in the DataStore object.

When the query returns a value like this:
POLYGON ((986180.549999997 395364.06999999285, 980858.34000000358 395544.87000000477, ..., 991264.73999999464 395122.95999999344, 986180.549999997 395364.06999999285))

The value showing up in the DataStore.getCellValue(row,col) is this:
POLYGON

Output from a query (View Tabular Data) and in a list appear to be correct.  It's just the DataStore object that contains the wrong data.

The length of the string values I'm using range from 7640 characters to 901,043 characters.  I don't see in the documentation (https://community.watsonanalytics.com/wp-content/uploads/2016/09/Scriptable-Reports-3-15-2017.zip?cm_mc_uid=46901008496914951200774&cm_mc_sid_50200000=1499461056) any limitation for the length of the values passed from the query to the DataStore object.

Have any of you seen this?  Do you know how to fix it?

dougp

I made a little progress on this.  It looks like the problem is with the nvarchar(max) data type.  The DataStore either doesn't like binary types or unicode types.  If I reduce the amount of text in each value, I can compare nvarchar(max) to nvarchar(4000) and varchar(8000).  Varchar(8000) and nvarchar(4000) both work.  Of course, I guarantee I'll have values with more than 8000 characters.  So, while this helps my understanding, it doesn't help solve my problem.