I want to ask how to add a computed column in BIRT that compute a number to its word representation?
(ex. 100 to “one hundred”)
So in my data set I can have a column that holds the string
I’m new at BIRT
hopefully there’s a pointer or two for me
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am aware this is quite an old post, but if you are still interested, this is how I’d go about doing it:
Add a script or jar that containing a function / method that would convert a number to a textual representation. To do this, for example, create a server-side-utilities.js file and in the ‘Resource Explorer’ tab add the resource. Then, in the ‘properties editor’ for the report itself, click the ‘resources’ tab and add that JS file.
Then edit the JS file to include a function that converts a number to text and save it. Then in your dataset dialog add a computed column, name it, set data type to string, and set the expression to invoke the defined function, passing to the function the value of the relevant column, e.g.
convertNumberToText(row["NUMERIC_COL"]).A partial implementation of
convertNumberToText()might be: