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 2022
:
Technical Questions
Topic: Addition with fields
Oldest Post First
Newest Post First
Author
Message
swatts
Groupie
Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Topic: Addition with fields
Posted: 26 May 2010 at 6:32am
I have fields like field1, field2, field3, etc...
Each field has a value of 1-5. I want to add each field...ie...
field1 + field2 + field3, etc...
Where I can get a total.
Any help would be appreciated.
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 26 May 2010 at 6:34am
assuming they are numeric and all on the same row create a formula field and add then just as you were...
table.field1 + table.field2 + table.field3
If you have the possibility of any NULL values in ANY of the fields you are adding make sure to make the formula use 'Default values for nulls'
IP Logged
swatts
Groupie
Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Posted: 27 May 2010 at 3:33am
They are considered a string but it will always be 1, 2, 3, 4, or 5 without an option to leave it blank.
IP Logged
swatts
Groupie
Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Posted: 27 May 2010 at 3:45am
If I just: tonumber ({field1} + {field2})
I get the fields joined. 34 instead of 7.
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 27 May 2010 at 3:49am
tonumber(field1) + tonumber(field2) + tonumber(field3) ...
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.016 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.