Gajanan Posted February 8, 2007 Share Posted February 8, 2007 any one reading this msg plz tell me solution ireportwill not support for casting if i want to use any operation on diff datatypes it gives me casting errorPost edited by: gajanan, at: 2007/02/08 07:45 Link to comment Share on other sites More sharing options...
atiqe007 Posted February 8, 2007 Share Posted February 8, 2007 explain it briefly . in what type do you want to cast. Link to comment Share on other sites More sharing options...
jmurray Posted February 9, 2007 Share Posted February 9, 2007 You have to be explicit with just about everything you do. Even a simple Default Value Expression needs to be cast correctly. For example, if you have a Patameter or Variable of (say) type java.lang.Integer then the expression for a default value of zero is not 0, it is new java.lang.Integer(0). The only exception is java.lang.String objects, where you can simply enter a literal string in double quotes. Often you will need to recast several times if you are doing calculations or formatting. The following example might help you to understand it better: http://www.jasperforge.org/index.php?option=com_mamblog&Itemid=109&task=show&action=view&id=239&Itemid=109 Check the section headed "Method 2. The Hard Way" as it breaks down a cast from Double to Long and back to Double for you. 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