2008-02-01

pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
2008-02-01 02:26 pm

Foreign languages to the win!

I got a weird (to me) error while trying to compile a JasperReports report.

It said that while trying to compile the helper Java class it created, it got errors trying to assign java.lang.Integer, [projectname].model.Customer, java.util.Date, ... to java.lang.String.

I had no idea how to fix that, and searching for the error message brought up only three hits: two in a French forum where someone was told to add .toString() (which wasn't really an option since I hadn't created the Java file myself and had no idea where JR put it, if it even stored it to disk at any point) -- and a Portuguese forum where the original poster was told quando você cria os campos no iReport, vc tem a opção de setar o tipo do campo.... and that told me what I needed to know: the field was correctly defined at the beginning of the report but the text field where I wanted to output it was not!

Whee!

And thank goodness that it was Portuguese and not, say, Tamil, where I would have had no idea what they were saying. This, at least I could mostly parse given my knowledge of English and French.