Hi Uday,
The column description of flUnit in the xml file is defined as xs:decimal, but the value is '10 m/s**2', i.e. it is really a string.
In Report Studio, when adding this file as an external data file, via 'Manage external data...', there is a step: 'Data attributes', in the bottom half of that dialog you can change the Data type:. In this case set it to Text.
Now you should be able to view the data as text. Once that works then you can add a calculation with the expression:
cast (
substring [flUnit],
0,
position(' ', [flUnit]) - 1
),
integer)
Here is a screenshot of the step where to change the data type:
------------------------------
HENK CAZEMIER
------------------------------
Original Message:
Sent: Tue July 16, 2019 05:37 PM
From: Babu Periassamy
Subject: Error while executing report A string manipulation exception occurred during the "convertData() function for 10 m/s**2" operation.
can you please try the below IBM Technote steps
https://www-01.ibm.com/support/docview.wss?uid=swg21340969
------------------------------
Babu Periassamy
Original Message:
Sent: Tue June 25, 2019 04:32 AM
From: Uday Jadhav
Subject: Error while executing report A string manipulation exception occurred during the "convertData() function for 10 m/s**2" operation.
Created Cognos Report as below
Where flunit has been added using following source
But data comes to this report externally
So value for flunit is coming as m/s**2, so when try to execute this report getting following error.
I dont have control over source or xmldatsource , i need to somehow manage this in Report, i tried casting this, but its not working, please suggest.
------------------------------
Uday Jadhav
------------------------------
#CognosAnalyticswithWatson