Print Page | Close Window

Contains * in text string formula

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2409
Printed Date: 01 May 2024 at 6:07pm


Topic: Contains * in text string formula
Posted By: grego
Subject: Contains * in text string formula
Date Posted: 22 Feb 2008 at 2:21am
I am trying to write a formula in Crystal 10 that only returns a text string when that text string contains the * character.  Any ideas on what syntax I should be using?
 
thanks



Replies:
Posted By: hilfy
Date Posted: 22 Feb 2008 at 6:57am
Try using this formula:
 
If InStr({table.field}, '*') > 0 then {table.field}
 
-Dell


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


Posted By: grego
Date Posted: 25 Feb 2008 at 2:26am

it worked perfectly - thank you so much - you've saved me hours!



Posted By: Gurbs
Date Posted: 14 Mar 2012 at 1:27am
I want just the opposite of this, I want to exclude everything containing a *. How can I modify the formula for this?


Posted By: DBlank
Date Posted: 14 Mar 2012 at 3:49am
InStr({table.field}, '*') = 0



Print Page | Close Window