Solved

crystal Int function not working

Posted on 2008-10-07
4
602 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:
Kdo earned 30 total points
Comment Utility
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
Comment Utility
Agree.

mlmcc
0
 

Author Closing Comment

by:Yossele
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now