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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with mid function in a formula

Status
Not open for further replies.

pleashelp

Technical User
Feb 27, 2002
97
US
I am using CR 8.5. This is the fomrula i am trying to use:

if ({Voucher.iPort}<99 and {PLT.strType}='CET') or
mid({Voucher.strBarCode},1,1) or {Device.strDeviceType}='CT'
then {Voucher.iAmount}/100

When I try to save the formula, I get an error message that says &quot;A boolean is required here&quot; with the cursor placed in front of the 'mid' . What am I doing wrong?
 
The part that says
---------------------------------
or mid({Voucher.strBarCode},1,1)
---------------------------------
is missing a condition.

For example,
-------------------------------------
or mid({Voucher.strBarCode},1,1) = &quot;C&quot;
-------------------------------------

Cheers,
- Ido


CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
well, maybe that isn't what i want then. What i want to do is pull the first digit off of the field called {Voucher.strBarCode}.
 
Left({Voucher.strBarCode},1) pulls the first digit.

Reebo
Scotland (Sunny with a Smile)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top