2005 IR Help Posted August 23, 2006 Share Posted August 23, 2006 By: Manish Hatwalne - manish_hatwalne XML to repot 2004-02-25 23:26 A silly nd dumb question perhaps, but I need to know. What happens to the XML file that I create for reports? If I change value for one field in textElement as well as field (say amount), it is still giving me ClassCastException. Where should I look nnow? I am sorry for ambiguous question, but modifying legacy code without any documentation; things don't get more complex than this!!! TIA, - Manish By: Teodor Danciu - teodord RE: XML to repot 2004-02-26 00:39 Hi, Make sure that the expression that you write inside the <textFieldExpression> tag returns values that are compatible with the "class" attribute of the same tag. The default is java.lang.String. I hope this helps. Teodor By: Manish Hatwalne - manish_hatwalne RE: XML to repot 2004-02-26 01:01 I have ensured this. It is java.lang.Integer How do I find out what is the class returned by $F{fieldname} TIA, - Manish By: Teodor Danciu - teodord RE: XML to repot 2004-02-26 01:12 Hi, In the XML there is a <field> tag that introduces your fieldname alog with its class. Thank you, Teodor By: Manish Hatwalne - manish_hatwalne RE: XML to repot 2004-02-26 01:33 Yes in that also I have marked it as Integer (I think I did mentioned it in first post), but no luck!!!! :( - Manish By: Teodor Danciu - teodord RE: XML to repot 2004-02-26 01:54 Hi, No, I'm afraid you did not mention it in the first post. You only told us about the ClassCastException. And in the second post you asked about the type of the $F{fieldname}, so you got your answer. We're in a vicious circle here... I suspect your report receives a custom data source and does not have an SQL query of its own. The cast exception might come from a mismatch between the declaration of your report field and the actual data found in the data source. I hope this helps. Teodor By: Manish Hatwalne - manish_hatwalne RE: XML to repot 2004-02-26 02:01 Maybe i did not make it clear, but this is what I meant by - If I change value for one field in textElement as well as field (say amount) I meant (1) I changed class in the textExpression as well as the <field> tag. My values indeed come from a custom data source (custom JDO of sorts..) and hence there is som much confusion. The exception indeed is due to mismatch. Thank you very much for all your help. maybe I should have made it clearer in the first post. - Manish 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