Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Removing a single word of the data Post Reply Post New Topic
Author Message
immute
Newbie
Newbie


Joined: 17 Nov 2010
Location: Philippines
Online Status: Offline
Posts: 1
Quote immute Replybullet Topic: Removing a single word of the data
    Posted: 18 Nov 2010 at 1:55pm
Hi, is there a way to remove a single word of the data displayed?

For example: I have a check amount of 1,039.71

It will be : ONE THOUSAND AND THIRTY NINE AND SEVENTY ONE ONLY on the check

I want it to be displayed as: ONE THOUSAND THIRTY NINE AND 71/100 ONLY

Is it possible to remove the "AND" word on the amount but not the last one where the cents is shown?



IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Nov 2010 at 8:40am
I'm not sure, if you are processing on the .Net side, I would look for all the occurrance after the last one use a lastIndexOf.
 
In CR, I'm not sure if they have such a function.  You could probably split the line into an array, search from the end to the beginning of the array and replace the offending array values with "", then use the JOIN function to get the string back.  I would probably check for double spaces and replace those with a single space.
 
It may not be optimal, but hopefully it will point you in a direction to a solution.
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.