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

How Do I put Leading Zeros in Crystal Report Amount Field?

Status
Not open for further replies.

hyde42

Technical User
Sep 17, 2007
16
US
I'm trying to have an amount show up with the actual amount and right fill with zeros so that the field length is always 13...for example 42471 would show as 4247100000000. Right now, in my criteria I have the following: {StecLGC_PremiumValues.EffectiveFrom}<>{StecLGC_PremiumValues.EffectiveThru} and
{StecLGC_PremiumValues.AccountType} = "retiree ib"

How do I add the data for the amount? Thanks! h
 
Leading zeros means zeros on the left. If your really want them on the right, you could do this:

stringvar x := totext({table.number},0,"");
x + replicatestring("0",13-len(x))

-LB
 
it's saying a boolean is required after my and statement from the previous line
 
and it wants something after the last + sign like a number, currency amount, boolean, date, time, etc...
 
You should be creating this formula in the field explorer->formula->new. Please do that and then report back if you still have any errors. You would then use this formula instead of the original field on the report.

-LB
 
it's asking for a boolean after the + sign
 
nevermind"...I got it! thanks! h
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top