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

Formula Editor question

Status
Not open for further replies.

peterb58

IS-IT--Management
Mar 20, 2005
110
I am trying to add a line in my formula editor to check a couple of setting in my data.

This is what I am entering

{previous bit of formula } and (entitytype = 6 and callcode<>'')

entitytype is numeric and callcode is a string.
What I am trying to achieve is to exclude records where the enitytype=6 and the callcode is blank.

Formula editor is removing the brackets and the overall formula is looking for ....and entitytype=6 and calcode<>''

How can I force the brackets to stay!!

CRXI on Sybase 11
 
If everything is a 'AND' the parans are not necessary, thus Crystal removes them. Don't know a way around this.
 
if you are trying to exclude records, maybe use:

{previous bit of formala} and (NOT(entitytpe = 6) and NOT(callcode<>''))
 
You need to show your ACTUAL formula, not a description of it.

-LB
 
Thanks so far, will try the NOT.

Lbass, the rest of the formula is a CASE section to convert textual input for date selection ( e.g Start of Previous Month ) to proper dates. It is not related to the bit I want to do, apart from the fact I want records between specific dates AND to exclude those records which have EntityType=6 and where CallCode=''.

The line immediately before is the :Default section of my CASE.

thanks

Pete
 
peter,
you will always get a more accurate/informed response if you post a copy/paste of the formula/code/etc in addition to a description of what you want to accomplish.
my suggestion was very general and vague, but hopefully applies to your needs.
 
You need to provide the entire formula in case the issue is related to how you constructed the formula in general, e.g., use of parens. I don't understand why you wouldn't just post the actual formula when requested.

If you want to exclude records with a code = 6 ONLY if the call code is blank, then try a clause like this:

not(
entitytype = 6 and
(
isnull(callcode) or
trim(callcode) = ""
)
)

-LB
 
Lbass

I am a minimalist sort of guy, I don't like to fill up screens with unnecessary information.
The formula was working OK with the entitytype, but I just wanted to add one more filter ( callcode ) to the working code. I just couldn't work out how to form the syntax.

Your solution has worked so I thank you and the other for your assistance.

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top