Solved

How do I format SOOrder.CuryLineTotal to read like 1,000.00?

  • 30 December 2022
  • 9 replies
  • 313 views

Userlevel 2
Badge

I want to format SOOrder.CuryLineTotal to read like 1,000.00 across the entire document. This is due to a formatting issue when having the report do math to the SOOrder.CuryLineTotal value. After the math, it comes out with no comma and more than two decimal places despite the ‘format’ column having of the text box having the right information. Any solutions?

icon

Best answer by ALEXSLUSSER15 3 January 2023, 16:57

View original

9 replies

Userlevel 5
Badge +1

All calculated fields do that. Add in CuryLineTotal as a schema field like below and this will resolve your issue.

 

Userlevel 2
Badge

All calculated fields do that. Add in that CuryLineTotal as a schema field like below and this will resolve your issue.

 

@brendan91 Sorry- how do I do this in a report?

Userlevel 5
Badge +1

Report designer can be trickier. After an equation, you may need to convert the answer using CInt([table.field]) or CDec([table.field]) and then use the field you want your calculated field to look like in the format line.

If you want a dollar sign, use c instead

 

Userlevel 6
Badge +2

@ALEXSLUSSER15 

I use #,##0.00 in the format property like so:

 

 

Userlevel 2
Badge

Report designer can be trickier. After an equation, you may need to convert the answer using CInt([table.field]) or CDec([table.field]) and then use the field you want your calculated field to look like in the format line.

If you want a dollar sign, use c instead

 

@brendan91 I tried this but it didn’t work. I think it’s because the value of the text box is an if/then statement. Any ideas on how to format the outcome of this? It’s just an if/then to determine what math should be done.

 

Userlevel 5
Badge +1

wrap each of those IIFs in a into a CStr() or CDec() like so...

=CStr(IIF([SoOrder.TermsID]=’5050’,[SoOrder.CuryLineTotal + 0.50, ‘’)) + CStr(IIF(…..)) + CStr(IIF(…..))

Then format =[SoOrder.LineTotal]

I believe that will work...Let us know!

Userlevel 2
Badge

wrap each of those IIFs in a into a CStr() or CDec() like so...

=CStr(IIF([SoOrder.TermsID]=’5050’,[SoOrder.CuryLineTotal + 0.50, ‘’)) + CStr(IIF(…..)) + CStr(IIF(…..))

Then format =[SoOrder.LineTotal]

I believe that will work...Let us know!

@brendan91 To get it working, I put CDec in front and put ='#,##0.00' in the formatting.

Userlevel 6
Badge +2

@ALEXSLUSSER15

Just so the solution is clear for the future, you do not need the CDEC in front as the result was already a decimal. The only thing needed is #,##0.00 in the formatting property.

 

Glad you got it working!

Userlevel 5
Badge +1

@DConcannon  I believe I’ve trained myself into a bad habit (or an unnecessary habit at best). I had a formula once that I “got working” by converting it to a number and I’ve been converting my formula’s ever since - “to be safe.” Turns out, this was likely unnecessary. 

I just confirmed for myself that Alex’s formula worked without the number conversion. As well as a lot of my own formulas 😏.Thanks

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved