Print Page | Close Window

How to get rid of a \ in address field?

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5166
Printed Date: 05 May 2025 at 8:01am


Topic: How to get rid of a \ in address field?
Posted By: Tovio
Subject: How to get rid of a \ in address field?
Date Posted: 08 Jan 2009 at 9:40am
The view is
vp_personv42.homestreet
 
The data is
12345 any street\
 
How can i get rid of \ on printed report?
 
 



Replies:
Posted By: hilfy
Date Posted: 20 Jan 2009 at 2:36pm
Create a formula that looks something like this:
Replace({vp_personv42.homestreet}, '\', '')
This will get rid of all instances of the '\' character in the string.  If '\' is a legitimate character somewhere else in the string, you can get rid of the last character in the string this way:
If Right({vp_person42.homestreet}, 1) = '\' then
  Left({vp_person42.homestreet}, length({vp_person42.homestreet}) - 1)
else
  ({vp_person42.homestreet}
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window