swathi.reddys2008 Posted November 7, 2012 Share Posted November 7, 2012 Am working on Ireports 3.7.5 . My problem is I want to multiply a field with constant value but it showing error "cannot cast int to double"For Example: $F{feild1}*2/100Please help me. Its urjent.Thanks in Advance. Link to comment Share on other sites More sharing options...
pascal.stuermer Posted November 7, 2012 Share Posted November 7, 2012 Check you in and out formats. The math operation should give int back. You have to convert something. like $V(X).toString() new String($V(X)) it doesnt works only with string! but also check you expectet outpu format Link to comment Share on other sites More sharing options...
pascal.stuermer Posted November 7, 2012 Share Posted November 7, 2012 Check you in and out formats. The math operation should give int back. You have to convert something. like $V(X).toString() new String($V(X)) it doesnt works only with string! but also check you expectet outpu format Link to comment Share on other sites More sharing options...
Edwin Posted November 8, 2012 Share Posted November 8, 2012 what data type is the field ?or try something like $F{feild1}* (double)(2/100) after you are sure the field is a doubleThanks. Link to comment Share on other sites More sharing options...
pascal.stuermer Posted November 9, 2012 Share Posted November 9, 2012 Jap he seems to be a ephemera :P. 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