Jump to content
We've recently updated our Privacy Statement, available here ×

eddie_4

Members
  • Posts

    4
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by eddie_4

  1. I previously had an issue of how to stop local timezone conversion for DOB fields.  User darth_fader provided a quick and simple solution.  However, now the textfield pattern is being ignored.   I have MM/dd/yyyy for the pattern but the report is formatting as yyyy-MM-ddT00:00:00.

     

    <textField pattern="MM/dd/yyyy" isBlankWhenNull="true">    <reportElement x="123" y="0" width="88" height="20" uuid="40bfec19-25c5-4807-801f-464034799729"/>    <textElement>     <font fontName="Arial" isBold="false"/>    </textElement>    <textFieldExpression><![CDATA[new org.joda.time.DateTime($F{dob}).withZone(org.joda.time.DateTimeZone.forID("UTC"))]]></textFieldExpression>   </textField>[/code]
  2. That answer helped me.  Thank you.  The date is now correct.  However it is ignoring the pattern.  I have MM/dd/yyyy for the pattern but the report is formatting as yyyy-MM-ddT00:00:00.

     

    <textField pattern="MM/dd/yyyy" isBlankWhenNull="true">    <reportElement x="123" y="0" width="88" height="20" uuid="40bfec19-25c5-4807-801f-464034799729"/>    <textElement>     <font fontName="Arial" isBold="false"/>    </textElement>    <textFieldExpression><![CDATA[new org.joda.time.DateTime($F{dob}).withZone(org.joda.time.DateTimeZone.forID("UTC"))]]></textFieldExpression>   </textField>[/code]

     

  3. Thanks for your response.  I'm still a noob in iReports and although I know C#, Javascript and a slew of other languages, java isn't in my back of tricks.

    Would I put code in the field def on the report?  Right now, I'm just using a pattern to format the data.

    Will I need to add another library for the Joda-Time libraries?  

    Sorry to be a pain, just not up to speed on the architecture of adding code to a specific field.

  4. I have a report that has several dates on it.  The dates are stored in the database in UTC format.  I have the report converting UTC to local report time, however, one of the dates is date-of-birth.  The database field is yyyy-mm-dd 00:00:00.  When the DOB is displayed on the report the date/time is adjusted -4, -5 or -6 hours and displays as the previous day.

    How can I keep the DOB from being adjusted to local time?

×
×
  • Create New...