Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Parse leading 0 Post Reply Post New Topic
Author Message
kimt
Newbie
Newbie
Avatar

Joined: 06 Oct 2009
Online Status: Offline
Posts: 39
Quote kimt Replybullet Topic: Parse leading 0
     Posted: 08 Nov 2012 at 10:10am
Have a text report that has a 5 character StreetNumber field. If there are fewer characters than 5 zeros are added.
 
This works with Access:
SELECT Lastname & ', ' & Firstname AS Name, Replace(LTrim(Replace(StreetNumber, "0", " ")), " ", "0") & ' ' & address AS sAddress, City & ', ' & State & ' ' & zip AS CityStZip, Telephone
FROM Customers
ORDER BY Lastname, Firstname
However, it is a no go when entered into cr 2008. Any solution?
 
thank you.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Nov 2012 at 11:20am

maybe this?

 
right('00000'+StreetNumber,5) as sAddress
IP IP Logged
kimt
Newbie
Newbie
Avatar

Joined: 06 Oct 2009
Online Status: Offline
Posts: 39
Quote kimt Replybullet Posted: 09 Nov 2012 at 12:33pm
Many thanks for the response.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum