Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Contains 'sometext' in data string formula Post Reply Post New Topic
Author Message
wsc27
Newbie
Newbie


Joined: 25 Jun 2012
Online Status: Offline
Posts: 11
Quote wsc27 Replybullet Topic: Contains 'sometext' in data string formula
     Posted: 25 Jun 2012 at 3:54am
I am trying to write a formula in Crystal 9 that only returns those that contains "Appointment Request Outgoing" AND "Records Sent" a data string where the data has other text/symbols as well.  In other words, if data contains "Appointment Request Outgoing" and "Records Sent" then pull the data to show up on the report regardless of what other data it contains.  Any ideas on what syntax I should be using?   Below is an example of one of the data of what the data field contains.  Also, I have included the current formula that have & I need to know how to embed this data contains formula into this formula that I am working from.  Thanks!
 
DOCDATA.Data (String)
 
{\rtf1\ansi\ftnbj{\fonttbl{\f0 \fswiss Arial;}}{\colortbl ;\red255\green255\blue255 ;\red0\green0\blue255 ;\red0\green0\blue0 ;\red0\green0\blue255 ;}{\stylesheet{\f0\fs20\cf0\cb1 Normal;}{\cs1\additive\cf0\cb1 Default Paragraph Font;}}\margl1440\margr1440\margt540\margb1440\headery540\footery720\formshade\sectd\marglsxn1440\margrsxn1440\margtsxn540\margbsxn1440\headery540\footery720\sbkpage\pgncont\plain\plain\fs20\pard\plain\fs20\cf0\fs22\sscharaux1 Appointment Request Outgoing\par\par Intention of the Request\par Request for opinion/advise regarding this patient 'Consultation'\fs20\par\fs22     \par\fs20\par\fs22\par Appointment Preference: First Available\fs20\par\fs22 Patient informed by: letter\fs20\par\fs22 Records sent\fs20\par\fs22\\fs20\par\cf3\fs22\sscharaux00\par}
 
Current Formula
 
{DOCUMENT.DOCTYPE} = 5.00 and
{DOCUMENT.SUMMARY} = "Request Appointment/Authorization" and
{DOCUMENT.STATUS} = "S" and
{@ClinicalDate} in DateTime (2012, 05, 01, 0, 0, 0) to DateTime (2012, 05, 31, 0, 0, 0)
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Jun 2012 at 4:11am
You can use LIKE or isntr()
 
{DocData.data} like "*Appointment Request Outgoing*" and
{DocData.data} like "*Records Sent*"
 
 
or
 
 
instr({DocData.data},"Appointment Request Outgoing")>0 and
instr({DocData.data},"Records Sent")>0
 
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