atsu Posted August 14, 2010 Share Posted August 14, 2010 I created a sum variable to calculate the total of of every column at the end of the page. The variable only shows the value of the final value in the result set. when I try to set the Expression class to java.lang.Double, the compiler throws the error:Cannot cast String to Double. Attached is a code and a copy of the file..... Somebody please help me out....... Link to comment Share on other sites More sharing options...
slow Posted August 17, 2010 Share Posted August 17, 2010 in the TOTAL_SQUID_QUANTITY variable definition you try to sum the squidQuantity field... but this field is defined (see the field declarations) as a String field...so this is the reason of your casting error. try to set squidQuantity type to double or float setting TOTAL_SQUID_QUANTITY type to the same one.give us feedback._________________________________________if it works... give me KARMA points please! : ) _________________________________________listening: Underworld - Rez/Cowgirl Link to comment Share on other sites More sharing options...
atsu Posted August 18, 2010 Author Share Posted August 18, 2010 I have tried that but it still will not work.. it continues to show the value of the last row as the total Link to comment Share on other sites More sharing options...
slow Posted August 18, 2010 Share Posted August 18, 2010 in the variable definition you have set a reset type of "page"... are you sure to want it?the other things seem to be correct... and the definition of a sum variable is a very simple task... Link to comment Share on other sites More sharing options...
rccsilva17 Posted February 13, 2019 Share Posted February 13, 2019 I had the same problem. It worked when I changed the value of the field "Increment Type" to "None", in the Variable Proprieties. 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