JasperReports - formatting currency and date fields

Discussion in 'Java' started by Dave, Feb 19, 2007.

  1. Dave

    Dave Guest

    I am using JasperReports and IReport to create reports for my application.

    How do I format a field to display currency values properly.

    e.g. I have a money/BigDecimal field, I want the value to display as
    "£240.04" instead of "240.0000"

    I also have a timestamp/java.util.Date field, I want it to display as
    "12/03/07" instead of "12/03/2007 00:00"

    Any ideas?
     
    Dave, Feb 19, 2007
    #1
    1. Advertisements

  2. Dave

    Dave Guest

    "Dave" <> wrote in message
    news:vIgCh.13355$...
    >I am using JasperReports and IReport to create reports for my application.
    >
    > How do I format a field to display currency values properly.
    >
    > e.g. I have a money/BigDecimal field, I want the value to display as
    > "£240.04" instead of "240.0000"
    >
    > I also have a timestamp/java.util.Date field, I want it to display as
    > "12/03/07" instead of "12/03/2007 00:00"
    >
    > Any ideas?


    Got it - use "patterns" in iReport.

    Easy!
     
    Dave, Feb 19, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    846
    Matthew Speed
    Nov 8, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,804
    Michael Borgwardt
    May 30, 2004
  3. Matt
    Replies:
    2
    Views:
    768
    Pete Becker
    Nov 8, 2003
  4. Matt
    Replies:
    3
    Views:
    947
    Richard Heathfield
    Nov 8, 2003
  5. BillE
    Replies:
    2
    Views:
    1,684
    BillE
    Jun 18, 2007
  6. Matt
    Replies:
    11
    Views:
    659
    Aaron Bertrand [MVP]
    Nov 8, 2003
  7. Master

    Date and Currency

    Master, Jul 2, 2004, in forum: ASP General
    Replies:
    3
    Views:
    190
    Evertjan.
    Jul 6, 2004
  8. Targa
    Replies:
    2
    Views:
    246
    Dr John Stockton
    May 12, 2004
Loading...