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. Advertising

  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. Advertising

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. ashish

    currency formatting for Euro

    ashish, Apr 27, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    443
    ashish
    Apr 27, 2004
  2. Vlad

    Currency Formatting

    Vlad, May 25, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,306
  3. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,250
    Michael Borgwardt
    May 30, 2004
  4. BillE
    Replies:
    2
    Views:
    1,130
    BillE
    Jun 18, 2007
  5. Targa
    Replies:
    2
    Views:
    94
    Dr John Stockton
    May 12, 2004
Loading...

Share This Page