Skip to main content
Solved

Report designer rounding down whole numbers

  • November 12, 2024
  • 4 replies
  • 77 views

Hi all

I need to round down values in report designer. Say a customer owes $1076, we need it to show as $1000 only. Please advise

Best answer by arthia98

Hi @Andre17 , We have to calculate the number of digits in a variable dynamically and then we can round it off. Please use the below formula

To calculate number of digits in a variable:

PadRight( '1', Len([YourAmountField] ), '0' )

Use the below formula to roundoff:

= Floor([YourAmountField] / (CInt(PadRight( '1', Len([YourAmountField] ), '0' )))) * (CInt(PadRight( '1', Len([YourAmountField] ), '0' )))

 

View original
Did this topic help you find an answer to your question?

4 replies

Nilkanth Dipak
Semi-Pro I
Forum|alt.badge.img+10

Hi @Andre17,

You can use below formula.

= Floor([YourAmountField] / 1000) * 1000
Hope, it helps!


  • Author
  • Freshman II
  • 7 replies
  • November 12, 2024

Hi Dipak - will try that. My amount field is a variable on the AR statement =$OrganizationBegBalance


Forum|alt.badge.img+1
  • Jr Varsity III
  • 75 replies
  • Answer
  • November 14, 2024

Hi @Andre17 , We have to calculate the number of digits in a variable dynamically and then we can round it off. Please use the below formula

To calculate number of digits in a variable:

PadRight( '1', Len([YourAmountField] ), '0' )

Use the below formula to roundoff:

= Floor([YourAmountField] / (CInt(PadRight( '1', Len([YourAmountField] ), '0' )))) * (CInt(PadRight( '1', Len([YourAmountField] ), '0' )))

 


  • Author
  • Freshman II
  • 7 replies
  • November 15, 2024
arthia98 wrote:

Hi @Andre17 , We have to calculate the number of digits in a variable dynamically and then we can round it off. Please use the below formula

To calculate number of digits in a variable:

PadRight( '1', Len([YourAmountField] ), '0' )

Use the below formula to roundoff:

= Floor([YourAmountField] / (CInt(PadRight( '1', Len([YourAmountField] ), '0' )))) * (CInt(PadRight( '1', Len([YourAmountField] ), '0' )))

 

Thank you - excellent formula!!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings