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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of ToText

Status
Not open for further replies.

crystal28

Programmer
Oct 23, 2002
108
US
Local Stringvar a;
Local Stringvar b;
Local Stringvar c;

If Isnull({Command.VarX1}) then a:='000' else a:= ({Command.Var1});
If Isnull({Command.Var2}) then b:='00' else b:= ({Command.Var2});
If Isnull({Command.Var3}) then c:='0000' else c:= ({Command.Var3});

In the above formula i need to have each value

that is a,b,c and d to be having 3 or 4 or whatever zeros i have number digits of numbers

Lets say a returns 23 i should have it with 3 digits,that is 023,how do i do this?is totext useful, if so how
 
Totext({YourNumericField},"000",0,"")



Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Thank you that works,what if the field datatype is a string,.
Totext works for numbers,what if its a string and if the length of the string is 2 and i want 3 digits there.right now i am checking every variable thrua if condition and adding a 0 before..
 
Picture({YourField},"000")

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top