-1

How can I add Dollar symbol in Textfield automatic in JasperStudio Soft? I have one Report show price, and I Want jasper studio to add an automatic $ symbol.

Alex K
  • 22,315
  • 19
  • 108
  • 236
Allex Ferra
  • 29
  • 1
  • 6
  • 1
    What do you mean by `automatic`? – Viki888 Jan 24 '17 at 10:24
  • Duplicate of [formatting a string to a currency format in jasper report](http://stackoverflow.com/q/10913495/876298) & [Formatting currency in Jasper Reports using pattern](http://stackoverflow.com/q/8758680/876298) & [Format money value according to locale and currency](http://stackoverflow.com/q/13346939/876298) – Alex K Jan 24 '17 at 14:06

1 Answers1

0

Usually you would use textfield patterns for displaying currencies:

There are already some predefined patterns in Jaspersoft Studio, which you could use:

Patterns in Jaspersoft

And this is how it would look like in the source code:

<textField pattern="¤#,##0.##;¤-#,##0.##">

An alternative (but also very ugly) way would be to just add the Dollar symbol in the expression:

<textFieldExpression><![CDATA["I am a value"+"$"]]></textFieldExpression>
Markus Deindl
  • 318
  • 1
  • 8