Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRXI - Pattern help needed

Status
Not open for further replies.

ReportDr00

IS-IT--Management
Mar 2, 2007
194
US
Hello,

I am trying to write section expert formula to suppress any records that matches below pattern in name field. It is regular expression that matches on drug concentrations like 5 mg/ml 100 mg/ml

"\d*\s?(mg)\/\s?mL"

The name fields has below data values

testname1 100mg/ml
testname2 1 mg/ml
testname3 5 mg/ ml
testname4 50mg/ ml
testname5 10mg
testname6 20mg

i need to supress the first 4 rows. I dont know how we can test for above pattern to suppress. I appreciate your feedback

Regards
Armani
 
Try
Code:
{your.field} like "mg/?ml"
Put this next to unselected data, and it should show "True" or "False". You could then add it to your selection, as @ChooseWhich

If there can be more than one character, use * rather than ?.

This is based on Crystal 2008. It always helps to give your Crystal version - 8, 8.5, 9, 10, 11, 2008 or whatever. Methods sometimes change between versions, and higher versions have extra options.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
I don't understand the pattern in relation to the sample you are showing, but it looks like you are just suppressing if the name field ends in "ml". If that's true, then you would just use a suppression formula of:

right(trim{table.field}),2)="ml"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top