change the currency format

Stimulsoft Ultimate discussion
waleedhm
Posts: 39
Joined: Fri May 31, 2013 1:26 pm

change the currency format

Post by waleedhm »

How to change the format of the currency by code
I want to add this coordination code "##,####0.0000"
Thank you in advance
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: change the currency format

Post by Alex K. »

Hello,

Please try to use the following expression:
{String.Format( "{0:##,####0.0000}", value)}

Thank you.
waleedhm
Posts: 39
Joined: Fri May 31, 2013 1:26 pm

Re: change the currency format

Post by waleedhm »

Please see the attached image I want access to text field inside the data
Attachments
2015-03-30_17-51-21.png
2015-03-30_17-51-21.png (24.77 KiB) Viewed 5082 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: change the currency format

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.
waleedhm
Posts: 39
Joined: Fri May 31, 2013 1:26 pm

Re: change the currency format

Post by waleedhm »

I have text box How Can I change the format of its currency
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: change the currency format

Post by Alex K. »

Hello,

Please try to use the following code:

Code: Select all

report.Load("");
StiText txt = report.GetComponentByName("Text1") as StiText;
txt.TextFormat = new StiCurrencyFormatService(1, 5, ",", 2, " ", 3, "$", true, true, " ");
Thank you.
waleedhm
Posts: 39
Joined: Fri May 31, 2013 1:26 pm

Re: change the currency format

Post by waleedhm »

thank you very much good work
excellent technical support
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: change the currency format

Post by Andrew »

Hello,

We are always glad to help you!
waleedhm
Posts: 39
Joined: Fri May 31, 2013 1:26 pm

Re: change the currency format

Post by waleedhm »

The problem appeared to me in the case of the search text box 3, for example, working in aunt and quality of the report, but in the case of the amendment to the report and delete or change the name shows me the problem
Dim Text3As StiText = TryCast(Report.GetComponentByName("Text3"), StiText)
Text3.TextFormat = New StiCurrencyFormatService(1, 0, ",", Currency, ",", 3, "", True, False, " ")
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: change the currency format

Post by Alex K. »

Hello,

Could you explain your issue in more details?

Thank you.
Post Reply