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

Checking a Date field for non-blank value 3

Status
Not open for further replies.

melburstein

Technical User
Aug 29, 2000
246
US
My Record Select formula currently says:

{@OrientationType} <> "DEPT" and
{Command.DATE-HIRED} = {?EnterDateRange}

It works fine. Now I want to expand it to NOT select records if there is a date in {Command.TERM-DATE}, a Date type field in an Oracle database, and that date falls within {?EnterDateRange}.

(I tried adding the following but it did not work)

and {Command.TERM-DATE} <> {?EnterDSateRange}

Can someone help me with the Formula?
 
Try:

And Not({Command.TERM-DATE} In {?EnterDSateRange})

-dave
 
The formula modification proposed by synapsevampire appears to work. Thank You [2Thumbsup]

Something strange happens when I try the code suggested both by vidru in this thread, and by bdreed35 in Thread 830752. Let me try to explain.

I can I go to the menu bar, Report, Selection Formulas, Record Selection and enter the formula and save and close. But when I click on the Selection Expert Formula Expert it shows my original code:
and {Command.Term-DATE} <> {?EnterDateRange}
instead of
and not ({Command.TERM-DATE} in {?EnterDateRange}).

When I run the report, I do not get the expected results. It produces what I had been getting from my opriginal formula that did not work.
 
That is odd, perhaps it's not properly being saved?

What version of CR?

In 8.5 you should select Report->Edit Selection Formula->Record

Delete anything in there that you don't want, and place in the formula manually. I never use the CR experts.

Also check the Report->Edit Selection Formula->Group

-k
 
It seems to me that if you are trying to exclude records in the parameter range that you need to use a selection formula like:

(
isnull({Command.TERM-DATE}) or
not ({Command.TERM-DATE} in {?EnterDateRange})
) and
{@OrientationType} <> "DEPT" and
{Command.DATE-HIRED} = {?EnterDateRange}

This would allow records with no term date or with term dates before or after the date range to appear in the report. Is that what you want?

-LB
 
Thank you lbass!!! This formula is much more complete and does exactly what I wanted it to do. BTY, I am using CR 9.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top