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

Splitting up Criteria and showing results

Status
Not open for further replies.
Jun 17, 2010
58
US
I'm using the formula for "yesterday" but the report will actually be used for "today". I have to use "yesterday" to compare to the actual report that was generated in the original program that I'm converting over to Crystal Reports.

I have the following in my selection statement:

(
(
({CONTACT2.UDATEINV}=today - 1)
OR
({CONTACT2.USTATREP}=today - 1)
OR
({CONTACT2.UDATERECD}=today -1)
)
)

I am trying to have the record selection to bring up all the records that have the field updated yesterday. Some of the fields like {contact2.udateinv} may have data in them that is an earlier date and the field {contact2.ustatrep} would be newer and sometimes {contact2.ustatrep has an earlier date than {contact2.udateinv}.

{contact2.udaterecd} will always have the newest date.

Suggestions?
 
You haven't explained what the issue is.

-LB
 
// ({CONTACT2.UDATERECD}=today-1) //returns 51
// ({CONTACT2.USTATREP}=today-1) //returns 5
// ({CONTACT2.UDATEINV}=today-1) //returns 32
// ({CONTACT2.UDATERECD}=today-1) or ({CONTACT2.USTATREP}=today-1) //returns 56
// ({CONTACT2.UDATERECD}=today-1) or ({CONTACT2.UDATEINV}=today-1) //returns 82
// ({CONTACT2.USTATREP}=today-1) or ({CONTACT2.UDATEINV}=today-1) //returns 10
// ({CONTACT2.UDATEINV}=today-1) OR ({CONTACT2.USTATREP}=today-1) //returns 34
// ({CONTACT2.UDATERECD}=today-1) or ({CONTACT2.USTATREP}=today-1) or ({CONTACT2.UDATEINV}=today-1) //returns 61
// ({CONTACT2.UDATERECD}=today-1) or ({CONTACT2.UDATEINV}=today-1) or ({CONTACT2.USTATREP}=today-1) //returns 84
 
The correct values I need it to return are the original ones but in combinations.

Specifically

// ({CONTACT2.USTATREP}=today-1) or ({CONTACT2.UDATEINV}=today-1) //returns 10
// ({CONTACT2.UDATEINV}=today-1) OR ({CONTACT2.USTATREP}=today-1) //returns 34

Should return 37 results

I need to get subtotal of the received amounts being 51 separated out in the report but I can work that myself. I need to make sure the 37 results show up properly though.

Each day it will be different as it is testing the staff's rate of work based on what is being received as well.
 
I created a brand new report and put in the same formulas in the wizard and things came out perfect. Not really sure how that happened, but it did. In any case, thanks to anyone who looked this over. It befuddles me how it works in a brand new report compared to a template that I was modifying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top