Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JasperReports - formatting currency and date fields

Reply
Thread Tools

JasperReports - formatting currency and date fields

 
 
Dave
Guest
Posts: n/a
 
      02-19-2007
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?


 
Reply With Quote
 
 
 
 
Dave
Guest
Posts: n/a
 
      02-19-2007
"Dave" <(E-Mail Removed)> wrote in message
news:vIgCh.13355$(E-Mail Removed)...
>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!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting a date in a gridview with auto-generated fields BillE ASP .Net 2 06-18-2007 02:09 PM
Date, date date date.... Peter Grison Java 10 05-30-2004 01:20 PM
Currency Formatting Vlad ASP .Net 3 05-26-2004 01:52 PM
Format to Currency when multiplying/Summing fields Targa Javascript 2 05-12-2004 02:13 PM
currency formatting for Euro ashish ASP .Net 0 04-27-2004 08:36 PM



Advertisments