ToText Function Question 
Author Message
 ToText Function Question

Here's a simple example to illustrate my question :

ToText(5) prints out '5.00'

What can I do to make it print out just 5 ?  Or even just 5.0

Cheers folks,

kam



Tue, 25 Apr 2000 03:00:00 GMT  
 ToText Function Question

If you're using CR 5.0 you may be able to use the Truncate function.

Check out the online or developer's help that ships with CR.

Quote:

> Here's a simple example to illustrate my question :

> ToText(5) prints out '5.00'

> What can I do to make it print out just 5 ?  Or even just 5.0

> Cheers folks,

> kam



Tue, 25 Apr 2000 03:00:00 GMT  
 ToText Function Question

Quote:

> ToText(5) prints out '5.00'

> What can I do to make it print out just 5 ?  Or even just 5.0

Depending on your version of Crystal Reports (I'm using version 6) the
ToText function allows you to supply an additional argument to solve
your problem.

ToText (5,0) prints out '5' because I've specified '0' decimal places.

You can also format the exact presentation format using other
parameters. I found all of this in the CRW Help file.



Tue, 25 Apr 2000 03:00:00 GMT  
 ToText Function Question

Use the extended formula ToText(numberfield, 0) where the 0 specifies
the number of decimal places you want to show.

Andy House
New Directions C & T Inc.
"We make Crystal sparkle!"

Quote:

> Here's a simple example to illustrate my question :

> ToText(5) prints out '5.00'

> What can I do to make it print out just 5 ?  Or even just 5.0

> Cheers folks,

> kam



Wed, 26 Apr 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ToText function didn't work!!!

2. totext function

3. Using the ToText function

4. format strings for CStr/ToText

5. Totext Convert Date without Month

6. HELP: Totext on numbers over 1000

7. ToText doesn't work

8. Date function question

9. Question about Printer Function

10. Question about VBA: something about String() function.

11. Public functions, easy question

12. Defined Function question

 

 
Powered by phpBB® Forum Software