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: Number of digits
Author
Message
Keikoku
Senior Member
Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Topic: Number of digits
Posted: 02 Dec 2010 at 8:23am
I want to display the number of digits in a number (so 102 would have 3 digits, 2004 would have 4 digits, and so on)
I thought of converting it to string first and then putting that through the length function, but it returns 8 instead.
That's cause it adds a bunch of commas and a decimal and 00's.
Is there a way to make it so I convert 2000 to "2000" without changing it? Or maybe just another way to calculate the number of digits..
Edited by Keikoku - 02 Dec 2010 at 8:25am
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 02 Dec 2010 at 8:33am
One way:
len(totext({table.numberfield},0,""))
IP Logged
Keikoku
Senior Member
Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Posted: 02 Dec 2010 at 9:44am
Is there a difference between how the totext function and the CStr function works? They both seem to be converting to a string.
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 02 Dec 2010 at 9:47am
They are the same
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
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
BAEZL
© 2004-2026 Brian Bischof. All Rights Reserved.