Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2020
:
Technical Questions
Topic: CEILING to 0.05 in CR 10
Oldest Post First
Newest Post First
Author
Message
MAwadi
Newbie
Joined: 16 Mar 2011
Location: Egypt
Online Status: Offline
Posts: 3
Topic: CEILING to 0.05 in CR 10
Posted: 16 Mar 2011 at 9:50pm
Hi Every One
I Use a Crystal Report 10 Version 10.0.0.533. There is not a function CEILING as in Ms Excell. I have a Calculating field.
So how can i make ceiling to 0.05?
Ex:
7.33 will become 7.35
7.5 will become 7.5
7.88 will become 7.9
IP Logged
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Posted: 17 Mar 2011 at 3:24am
my thought would be to code a function for the report. since you know the number of decimal places desired, you could write a function like:
pass in the number(x), pass in the ceiling value (y)
local numbervar temp := x/y;
if temp - int(temp) <> 0 then
temp := int(temp) + 1;
temp * y
HTH
IP Logged
MAwadi
Newbie
Joined: 16 Mar 2011
Location: Egypt
Online Status: Offline
Posts: 3
Posted: 19 Mar 2011 at 5:38am
Thank u for ur reply
but i try many ways and many function. but i didin't get what i need.
IP Logged
MAwadi
Newbie
Joined: 16 Mar 2011
Location: Egypt
Online Status: Offline
Posts: 3
Posted: 20 Mar 2011 at 1:22am
Finally I find the way. This is the idea Ex: 7.33
A = 7.33
B = Round(7.33,1) The Result is 7.30
C= A-b The Result is 7.33-7.3 = .03
If C = 0.05 or -0.05 then 0
elseIf (0.05-C) < 0.05 and C > 0 then 0.05-C
elseIf 0.05 - C > 0.05 Then C-0.05
Thank Every Body
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum
This page was generated in 0.031 seconds.
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
CLICK PLAYS
|
COACH FORUMS
|
TROPICAL FISH
© 2004-2024 Brian Bischof. All Rights Reserved.