Jump to content
Changes to the Jaspersoft community edition download ×

Pattern Expression

Go to solution Solved by prusyn,

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

There are a bunch of approaches, which depend on your java knowledge. For example, expressions:


String.format("%.2f", new BigDecimal(Double.parseDouble($F{sample})))[/code]


new DecimalFormat("0.00").format(new Double($F{sample}))[/code]

where $F{sample} is a field from dataset, that contains numbers. I used sample query: 

select '25.45060506506456' as sample[/code]

Also, attaching report.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...