Bit Data Type Conversion
#1
Posted 28 June 2012 - 05:45 PM
I have a record which is in bit data type(example: F2F0F0F9F0F8F0F4, F1F3F6F5F1F7) How to display the record omitting letter "F"?, end result should be 20090804, 136517.
I had tried this method in initialize script...
function mySplit(str){
var myString = str;
var mySplitResult = myString.split("F");
return mySplitResult;
}
and i got this error
The following items have errors:
Data (id = 198):
+ A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: Java class "[B" has no public instance field or method named "split".
Script source: null, line: 0, text:
<compiled script> (Element ID:198)
..... any idea? Thanks
#3
Posted 01 July 2012 - 05:18 PM
I am getting from AS400, char() for bit data(8). The record sample is F2F0F1F2F0F6F2F0, when i use blob type it display as it is is F2F0F1F2F0F6F2F0, but when use String it display FFFFFFF2 FFFFFFF0 FFFFFFF1 FFFFFFF2 FFFFFFF0 FFFFFFF6 FFFFFFF2 FFFFFFF0. Just wasted to out 20120620.
Thanks
#4
Posted 01 July 2012 - 06:38 PM
Edit Expressions:
var mystring = new Packages.java.lang.String(dataSetRow["yourField"], "IBM01140");
mystring;
litojulian, on 01 July 2012 - 05:18 PM, said:
I am getting from AS400, char() for bit data(8). The record sample is F2F0F1F2F0F6F2F0, when i use blob type it display as it is is F2F0F1F2F0F6F2F0, but when use String it display FFFFFFF2 FFFFFFF0 FFFFFFF1 FFFFFFF2 FFFFFFF0 FFFFFFF6 FFFFFFF2 FFFFFFF0. Just wasted to out 20120620.
Thanks






MultiQuote



