Skip to main content

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?

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

 


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?


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

 


@ALEXSLUSSER15 

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

 

 


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.

 


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 =aSoOrder.LineTotal]

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


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


@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!


@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