Hi Kent :)
Checked my Crystal Reports v 10 help... you need the third variable for
telling the function you want no decimals... ie give me an integer... at
least I think that is what you want :) Take a gander at below..
Art
CStr
Basic and Crystal syntax.
CStr and ToText are equivalent functions.
Overloads
CStr (x)
CStr (x, y)
CStr (x, y, z)
CStr (x, y, z, w)
CStr (x, y, z, w, q)
Arguments
|--------------------------+-------------------------------------------------------------------------------------------------------------------------|
| Number and Currency | x is a Number or Currency value to be converted into a text string; it can be a whole or fractional value. |
| values (formatting) | y is a text string used to indicate the format for displaying the value in x. See Format Strings for information |
| | on creating a format string. |
| | z is a whole number indicating the number of decimal places to carry the value in x to. (This argument is |
| | optional.) |
| | w is a single character text string indicating the character to be used to separate thousands in x. Default is the|
| | character specified in your International or Regional settings control panel. (This argument is optional.) |
| | q is a single character text string indicating the character to be used as a decimal separator in x. The default |
| | is the character specified in your International or Regional settings control panel. (This argument is optional.) |
|--------------------------+-------------------------------------------------------------------------------------------------------------------------|
=======================================================
Art Bahrs, CISSP Information Security The Regence Group
(503) 553-1425 FAX (503) 553-1453
|---------+-------------------------------->
| | "KENT WALLACE" |
| | <rwallace@Primaryheal|
| | th.com> |
| | Sent by: "HP-3000 |
| | Systems Discussion" |
| | <[log in to unmask]
| | DU> |
| | |
| | |
| | 11/23/2004 03:58 PM |
| | Please respond to |
| | "KENT WALLACE" |
| | |
| | |-------------------||
| | | [ ] Secure E-mail ||
| | |-------------------||
|---------+-------------------------------->
>--------------------------------------------------------------------------------------------------------------------------|
| |
| To: [log in to unmask] |
| cc: |
| Subject: [HP3000-L] OT: Crystal Report formula |
>--------------------------------------------------------------------------------------------------------------------------|
Anyone
Crystal Reports, VB.net version 9
dim NewMonth as number
dim newyear as number
let newyear = {@YearSelNum}
let Newmonth = {@MonthNum} + 1
if newmonth > 12 then
newmonth = 1
newyear = {@YearSelNum} + 1
end if
formula = cstr(newyear)+ "/" + cstr(newmonth)
It returns
2003.00/2.00
These are numbers not currency? What am I doing wrong?
Kent Wallace
Boise, ID
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
=============================================================================
IMPORTANT NOTICE: This communication, including any attachment, contains information that may be confidential or privileged, and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message is strictly prohibited. Nothing in this email, including any attachment, is intended to be a legally binding signature.
=============================================================================
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|