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!

Trouble with group selection formula editor

Status
Not open for further replies.

Gameboy9

Programmer
Jun 8, 2001
39
US
I posted here yesterday trying to get parameters into a SQL statement... but I'm now using a completly different method. First, I should mention I'm using Visual Foxpro ODBC using free tables.

I need to pull maximum expiration dates on employee training... and I was successful in doing so thanks to another post in this forum. One problem though: we need null dates as well... and I'm unsuccessful in getting null-date matches. Actually, it says there's a match on the left side of the preview box, but there isn't a match on the report itself.

I wrote in the group selection formula editor...

{tkmul001.u_trnexp} = Maximum({tkmul001.u_trnexp},{@empname}) or ({tkmul001.u_trnexp} = Date (0, 0, 0))

I also attempted to use IsNull({tkmul001.u_trnexp}), but that got me an error: A date is required here. Further, this: {tkmul001.u_trnexp} = Date (0, 0, 0) returned no hits at all. (it really should return 1 hit, apparently... 0,0,0 is the null date, right?)

Assistance is appreciated. Thanks.
 
Left side of the preview box"...what does that translate to in techinical terms?

Try removing "({tkmul001.u_trnexp} = Date (0, 0, 0))"

If you turn on the Report Options->Convert default null value to default then you can check against default values.

Also nulls need to be checked 1st.

You might try:

(
isnull({tkmul001.u_trnexp})
or
{tkmul001.u_trnexp} = Maximum({tkmul001.u_trnexp},{@empname})
)

Or move the IsNull({tkmul001.u_trnexp}), to the Record Selection Formula, as opposed to the group.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top