Jump to content

$ before printing price value


rbojja

Recommended Posts

HI,

I am printing total amount in my pdf.I want to print a $ before the total amount.

 

Now it is printing as total 1234.It should print as

$1234.

 

1234 is the value being fetched from DB.

 

$F{total_amt} is the field expression i am using.How to assign $ before the total amount.

 

Thanks

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

In the text field expression you can do something like this:

 

"$" + $F{total_amt}

 

Make sure the class of the text field is a String after doing this.

 

Also when using iReport, in the textfield properties, click the text field tab and then the create button next to the Pattern drop down. You will see a Currency pattern. Try playing with this as well.

 

I hope this helps.

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