E9: Calculated Field Rounding up


(system) #1
#ygrps-yiv-931736975 .ygrps-yiv-931736975style1 {font-family:"Times New Roman";}

Thanks for the feedback.  The fields were already in the BAQ, so I just created the formula in Crystal Reports.  Googled it and found the function CEILING() and FLOOR()

 

CEILING(1.19) = 2

FLOOR(1.19) = 1

 

Miguel A. Santillan

Compass Manufacturing Systems

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, September 15, 2016 11:25 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: E9: Calculated Field Rounding up

 

 

A trick to "round up" when a system just truncates, is to add 0.5 to the result.

 

 70 / 36 + 0.5 = 2.44 , wich truncates to 2.0

 

This is an old trick from assembly language programming days (pre - floating point math)

 

Calvin

 



Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.


(system) #2
#ygrps-yiv-1981579155 .ygrps-yiv-1981579155style1 {font-family:"Times New Roman";}

Can you round up in a calculated field.

 

If I have a field with the value of 70 and my other value is 36, my calc field is trying to calculate 70 / 36 = 1.94, but Epicor is only returning 1, I would like it to return 2.  Is there a roundup function?

 



Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.


(system) #3
Are you doing this in ABL code (Progress), or is this in the UI (C# or VB.NET)? The answer to your question is "yes", you can round, but how you do it depends on the language.Â

It sounds as if you're moving this into an integer field, and in that case, without rounding, it would truncate.Â

Kevin Simon
SimsTrak Consulting, LLC

On Thu, Sep 15, 2016 at 2:16 PM, Miguel Santillan msantillan@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>

Can you round up in a calculated field.

Â

If I have a field with the value of 70 and my other value is 36, my calc field is trying to calculate 70 / 36 = 1.94, but Epicor is only returning 1, I would like it to return 2. Is there a roundup function?

Â



Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

</div>
 


<div style="color:#fff;min-height:0;"></div>


(system) #4
A trick to "round up" when a system just truncates, is to add 0.5 to the result.

 70 / 36 + 0.5 = 2.44 , wich truncates to 2.0

This is an old trick from assembly language programming days (pre - floating point math)

Calvin