Solved

crystal Int function not working

Posted on 2008-10-07
4
609 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
  • 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 100

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 100

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
How to increase the row limit in Jasper Server.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

685 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