Re: JasperReport LocalDate question
Re: JasperReport LocalDate question
- Subject: Re: JasperReport LocalDate question
- From: Paul Hoadley <email@hidden>
- Date: Wed, 2 Feb 2011 09:05:11 +1030
With the caveat that I don't know anything about JR...
On 02/02/2011, at 1:08 AM, Theodore Petrosky wrote:
> I used the org.joda.time.LocalDate for the Field Class Definition.
Don't you want to be using your wrapper class for LocalDate, not Joda's LocalDate? This name collision is unfortunate—when I borrowed the code from Henrique's sample project, I renamed the wrapper class to LSLocalDate to avoid just this confusion. It's the wrapper class that's in your model, and that is presumably being handed to JR.
> I still get the compile time error that it can not cast from LocalDate to java.util.Date:
Of course, that doesn't explain why JR is still trying to cast it to a Date. I just don't know enough to help there.
> So I tried changing to an NSTimestamp to see if I installed the jars correctly and Voila. No compilation errors. So it looks like Joda LocalDate does not Extend java.util.Date.
It certainly doesn't. Nor does your wrapper class. Nor should they.
> We have entered the world of, "I have no idea where to go now".
That's disappointing (mostly for you!), because the Joda LocalDate class works just fine as a custom attribute type, and solves exactly your original problem. I'm sorry I don't know enough about JR to help you integrate it there.
--
Paul.
http://logicsquad.net/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden