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

Criteria in Suppress Format Formula Editor will not work ! 2

Status
Not open for further replies.

antonx

Programmer
Nov 16, 2002
31
CA
Hi,

I have Crystal Reports 8.5.

My GH#3 is grouped by Birthdate and it has the following fields:

Birthdate Contract_no Min of Transdate

Min of Transdate field was created because a Contract_no could repeat in the table and I only need the first occurence (i.e. earliest Transdate) of the Contract_no.

Now, I want the record to be printed only if the Transdate is between 2004/12/01 and 2004/12/31.

I inserted the following formula in the

GH#3 -> Format Section -> Suppress (No Drill_Down)

Minimum ({RTL_SALES_IS.TRANSDATE}, {TINFO.BIRTHDATE}) <= cdate(2004, 12, 01) and
Minimum ({RTL_SALES_IS.TRANSDATE}, {TINFO.BIRTHDATE}) >= cdate(2004, 12, 31)


It does not work. I still see records between 2004/12/01 and 2004/12/31.

What am I doing wrong. Please help.

Thanks


 
Since you specifically use the term printed, do you mean that you want totals and so on to include this period, just not display nor print?

WHy are you using minimum if you now only want them if the date is between 2 dates rather than the minimum? Did you mean to say "Now, I want the record to be printed only if the *MINIMUM* Transdate is between 2004/12/01 and 2004/12/31?

A simpler means to limit data might be to use a date parameter to limit the data rather than hardcoding, and then reference it in the record slection criteria.

Create a date parm
Go into the Report->Edit Selection Formula->Group and place something like:

Minimum ({RTL_SALES_IS.TRANSDATE}, {TINFO.BIRTHDATE}) >= minimum(MyDateParm) and
Minimum ({RTL_SALES_IS.TRANSDATE}, {TINFO.BIRTHDATE}) <= maximum(MyDateParm)

Or if you want only dates between those periods use the Report->Edit Selection Formula->Record and place

{RTL_SALES_IS.TRANSDATE} in {MyParmDate}

-k
 
Your suppression formula should be:

Minimum ({RTL_SALES_IS.TRANSDATE}, {TINFO.BIRTHDATE}) <= cdate(2004, 12, 01) OR
Minimum ({RTL_SALES_IS.TRANSDATE}, {TINFO.BIRTHDATE}) >= cdate(2004, 12, 31)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top