Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display number parameter as text value in Formula 2

Status
Not open for further replies.

rptg

Technical User
Aug 24, 2009
5
US
The Formula below contains a number parameter field that needs to function as a text value:

Stringvar s:=""; //a string to accumulate the parameter values
Numbervar i; // to use a counter
For i := 1 to count({?Read_Route})
step 1 do s:=s + ", "+({?Read_Route}) ;
ProperCase(s) [3 to length(s)]; //

The following error message returns:
"A string is required here" for "({?Read_Route}) "

Tried adding ‘to text’ like below:
step 1 do s:=s + ", "+(totext({?Read_Route})) ;
The following error message returns:
"This array must be subscripted..."
 
put the totext around the entire array

totext({?Read_Route})

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
You might want to eliminate decimals and commas, by using:

totext({?Read_Route},0,"")

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top