zeeshanhashmi Posted March 31, 2014 Share Posted March 31, 2014 Hi, I have a report where I want to use java class to convert amount to workds. I converted the Java Class file to a JAR file and added that JAR file (ADD JAR) via iReport.Now, when I tried to run that report I see the error window pops up and show this:Please guide me how to fix this.Thank youRegards=================================================Error MessageErrors were encountered when compiling report expressions class file: 1. com.HashmiTech.NumberToWords cannot be resolved to a type value = com.HashmiTech.NumberToWords.convert( ((java.lang.Double)field_grand_total.getValue()) ); //$JR_EXPR_ID=9$ <------------------------> 2. com.HashmiTech.NumberToWords cannot be resolved to a type value = com.HashmiTech.NumberToWords.convert( ((java.lang.Double)field_grand_total.getValue()) ); //$JR_EXPR_ID=10$ <------------------------> 3. com.HashmiTech.NumberToWords cannot be resolved to a type value = com.HashmiTech.NumberToWords.convert( ((java.lang.Double)field_grand_total.getOldValue()) ); //$JR_EXPR_ID=9$ <------------------------> 4. com.HashmiTech.NumberToWords cannot be resolved to a type value = com.HashmiTech.NumberToWords.convert( ((java.lang.Double)field_grand_total.getOldValue()) ); //$JR_EXPR_ID=10$ <------------------------> 5. com.HashmiTech.NumberToWords cannot be resolved to a type value = com.HashmiTech.NumberToWords.convert( ((java.lang.Double)field_grand_total.getValue()) ); //$JR_EXPR_ID=9$ <------------------------> 6. com.HashmiTech.NumberToWords cannot be resolved to a type value = com.HashmiTech.NumberToWords.convert( ((java.lang.Double)field_grand_total.getValue()) ); //$JR_EXPR_ID=10$ <------------------------> 6 errors================================================= Link to comment Share on other sites More sharing options...
hozawa Posted March 31, 2014 Share Posted March 31, 2014 Seems like you have a data type problem. What datatype does com.HashmiTech.NumberToWords return? What's the expression where it's uses? Are you using Scriptlets? Try using a variable in your field or parameter expression and calling calling your java class in your variable, but before you do, try setting a value in your variable to make sure your expressions works. Link to comment Share on other sites More sharing options...
zeeshanhashmi Posted March 31, 2014 Author Share Posted March 31, 2014 com.HashmiTech.NumberToWords.convert($F{grand_total}) This is how I am calling this. It gets numbers for example, 34890.90 and then it converts it to "Thirty four thousand eight hundred and ninty Dollars and Ninty cents." Link to comment Share on other sites More sharing options...
zeeshanhashmi Posted April 1, 2014 Author Share Posted April 1, 2014 <![CDATA[com.HashmiTech.NumberToWords.convert($F{grand_total})]]>This is how I am calling this. It gets numbers for example, 34890.90 and then it converts it to "Thirty four thousand eight hundred and ninty Dollars and Ninty cents." Link to comment Share on other sites More sharing options...
zeeshanhashmi Posted April 1, 2014 Author Share Posted April 1, 2014 Is there anyone who can help ? Seems to be a dead forum. Link to comment Share on other sites More sharing options...
narottamgupta51 Posted July 17, 2014 Share Posted July 17, 2014 did you get this working? Link to comment Share on other sites More sharing options...
narottamgupta51 Posted July 17, 2014 Share Posted July 17, 2014 I was able to solve the issue by migrating to Jaspersoft Studio version 5.6.0.final. Jaspersoft Studio is the official report designer anyway. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now