Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: subtract two fields Post Reply Post New Topic
Author Message
liher
Newbie
Newbie


Joined: 20 Feb 2007
Online Status: Offline
Posts: 9
Quote liher Replybullet Topic: subtract two fields
    Posted: 20 Feb 2007 at 8:40am
Hello!
Im newbie too in crystal reports hehe and I would like to create a formula to sustract two fields of a access file.
I tried something like:
 {Calibracion.PATRON_01} - {Calibracion.ELEMEN_01}
 
but not working...
 
Can someone make me this small formula?
 
thanks in advance
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Feb 2007 at 9:11am
Well, we need more info about what is not working. It appears to be a simple function which you have written correctly. Does it give you the wrong result, does it give an error message of some sort?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
liher
Newbie
Newbie


Joined: 20 Feb 2007
Online Status: Offline
Posts: 9
Quote liher Replybullet Posted: 20 Feb 2007 at 9:23am
yes, it says "a number, currency amount, date, time, or date-time is required here"
 
I dont know if I am doing the formula in the right place. I tried in CSS Class Name clicking in X+2
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Feb 2007 at 10:07am
Well, I think you need to read some of the chapters in my free online book. This is getting a bit confusing. The CSS Class Name is for formatting the output. I don't think this is what you want? You need to create a new formula in the Field Explorer window and then drag and drop that formula onto your report to view it.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
liher
Newbie
Newbie


Joined: 20 Feb 2007
Online Status: Offline
Posts: 9
Quote liher Replybullet Posted: 20 Feb 2007 at 11:43pm
I created a formula in the Field Explorer window, now it shows a result but only when I use Operators -> Arithmetic -> Add. When I use Subtract I get the same error.
The field numbers are in this format   00149,16
IP IP Logged
liher
Newbie
Newbie


Joined: 20 Feb 2007
Online Status: Offline
Posts: 9
Quote liher Replybullet Posted: 22 Feb 2007 at 3:03am

finally I did it without any knowledge

tonumber({Calibracion.PATRON_01}) - tonumber({Calibracion.ELEMEN_01})

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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.035 seconds.