Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: selective suppression Post Reply Post New Topic
Author Message
stevbren
Newbie
Newbie
Avatar

Joined: 20 Nov 2007
Online Status: Offline
Posts: 33
Quote stevbren Replybullet Topic: selective suppression
    Posted: 27 Feb 2008 at 12:20pm

I need to suppress everything after the asterisks in a job description when this report is run. The amount of asterisks is not always the same (humans), can this be done?

 

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 27 Feb 2008 at 2:40pm
Create a formula something like this:
 
left({job descrip field}, InStrRev({job descrip field}, '*') + 1)
 
(You may not need the "+ 1"....I always have problems remembering when to use it when working with parts of strings.)  The "InStrRev" looks for the first asterisk from the right in the string and returns its position
 
Use this formula on your report instead of the field.
 
-Dell


Edited by hilfy - 27 Feb 2008 at 2:40pm
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.