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!

Selection Formula ordering

Status
Not open for further replies.

lthomas6

MIS
Aug 22, 2007
87
US
I have a Crystal 10 report connecting to a Oracle 10 db.
When the selection criteria is set to below, the report pulls in the record fine:
({USERFIELD.USERFIELDPROFILE_ID} = 10059.00 and {USERFIELD.USERFIELDVALUE} = 'True')
and {MEMBER.RELATIONSHIPCLASS_ID} in [1020,1030] and
(day(currentdate) in 1 to 14 and
{MEMBER.STARTDATE} in dateserial(year(currentdate),month(currentdate)-1,15) to
dateserial(year(currentdate),month(currentdate),1)-1
or
day(currentdate) in 1 to 14 and
{MEMBER.ENDDATE} in dateserial(year(currentdate),month(currentdate)-1,15) to
dateserial(year(currentdate),month(currentdate),1)-1
) or
(
day(currentdate) >= 15 and
{MEMBER.STARTDATE} in date(year(currentdate),month(currentdate),1) to
date(year(currentdate),month(currentdate),14)
or
day(currentdate) >= 15 and
{MEMBER.ENDDATE} in date(year(currentdate),month(currentdate),1) to
date(year(currentdate),month(currentdate),14))

However when I place the top code in the bottom, it multiplies the record:

(day(currentdate) in 1 to 14 and
{MEMBER.STARTDATE} in dateserial(year(currentdate),month(currentdate)-1,15) to
dateserial(year(currentdate),month(currentdate),1)-1
or
day(currentdate) in 1 to 14 and
{MEMBER.ENDDATE} in dateserial(year(currentdate),month(currentdate)-1,15) to
dateserial(year(currentdate),month(currentdate),1)-1
) or
(
day(currentdate) >= 15 and
{MEMBER.STARTDATE} in date(year(currentdate),month(currentdate),1) to
date(year(currentdate),month(currentdate),14)
or
day(currentdate) >= 15 and
{MEMBER.ENDDATE} in date(year(currentdate),month(currentdate),1) to
date(year(currentdate),month(currentdate),14))
and ({USERFIELD.USERFIELDPROFILE_ID} = 10059.00 and {USERFIELD.USERFIELDVALUE} = 'True')
and {MEMBER.RELATIONSHIPCLASS_ID} in [1020,1030]

Trying to figure out why??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top