• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: JasperReport LocalDate question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JasperReport LocalDate question


  • Subject: Re: JasperReport LocalDate question
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 1 Feb 2011 15:38:02 -0800

On Feb 1, 2011, at 3:35 PM, Theodore Petrosky wrote:

> so that's what I just tried. a cover method to access the LocalDate
>
>
> public NSTimestamp invoiceBDTimestamp() {
>   DateTime dt = new DateTime(invoiceBookedDate().toString());
>   NSTimestamp theIBDTS = new NSTimestamp(dt.getMillis());
>
>   return theIBDTS;
> }
>
> Now I can access it as an NSTimestamp in iReport. Problem is gone.

The Problem is not seen.  :-)  Now you have a point in time again, which means the date can change with changes in time zone and day light savings time.

Chuck


> --- On Tue, 2/1/11, Paul Hoadley <email@hidden> wrote:
>
>> From: Paul Hoadley <email@hidden>
>> Subject: Re: JasperReport LocalDate question
>> To: "Theodore Petrosky" <email@hidden>
>> Cc: "WebObjects-Dev Mailing List List" <email@hidden>
>> Date: Tuesday, February 1, 2011, 5:35 PM
>> 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

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Re: JasperReport LocalDate question (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: Re: Better D2W question: pull down lists for relationships
  • Next by Date: Re: Better D2W question: pull down lists for relationships
  • Previous by thread: Re: JasperReport LocalDate question
  • Next by thread: AjaxTabbedPanel - Implementation changes
  • Index(es):
    • Date
    • Thread