Solved

crystal Int function not working

Posted on 2008-10-07
4
611 Views
Last Modified: 2013-11-15
I created a function.  Inside I have two value. 1080.00  and  1062.00
I substract them; I display them using the int function. Still I get back a non-integer value: 18.00
I know it is pretty straght forward and very simple, but ... here I am asking
Any idea? anyone?
Thanks
All The Best

Yossele

Code:
--------------------------------------------
Local NumberVar MyStart := 1062.00;
Local NumberVar MyEnd   := 1080.00;
int (MyEnd - MyStart);
--------------------------------------------
 the result is  18.00  ( instead of  18 )
0
Comment
Question by:Yossele
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 45

Accepted Solution

by:
Kent Olsen earned 30 total points
ID: 22662289
Hi Yossele,

The int function doesn't control the display of a value.  It merely drops the fractional part of the value.

Rt-click on the field and select format -> number -> custom style.  Select "0" in the decimals field.


Kent
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 20 total points
ID: 22662861
Agree.

mlmcc
0
 

Author Closing Comment

by:Yossele
ID: 31503950
Thank you for such a prompt response.
Sometimes a simple answer will catapulte you toward a different search path where you find the solution.
Amaizing DIVINITY

Thanks
All The Best

Yossele
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 22664278
Yossele -  You really should have given all the points and the compliment to KDO.

KDO - Grading Comments:
Thank you for such a prompt response.
Sometimes a simple answer will catapulte you toward a different search path where you find the solution.
Amaizing DIVINITY

Thanks
All The Best

Yossele

I will reopen the question if you wish so you can grade it appropriately.

mlmcc
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question