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

Unusual Formulas

Status
Not open for further replies.

LMRollins

MIS
Nov 14, 2000
120
US
Let's see if I can explain this. I have a COS report that I need to get data for the current year and the month of December. I've figured out that formula by using DateAdd to my start date parameter. But now comes the hard part. I also need it to show me info for all customers in the current year but only one specific customer (which would be a parameter) for the month of December. Does anyone know if this can be done?
 
Hi,
A little clarification:

If other customers have start dates in December, do you want to exclude them, EXCEPT for 1 specific customer?

Sort of like:
(StartDate within 1 year and Not Month(12)) or
(StartDate within 1 year and Month(12) and CUST=XXXX)



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Why would you have a date parameter if you always need the current year? January 1 never changes.

Anyway, I'll skip over that for now and address the one customer issue.

The record selection formula would be something like:

(
{table.datefield} >= {?MyStartDate}
)
and
(
{table.datefield} >= dateadd("m",-1,cdate(year(currentdate),1,1))
and
{table.datefield} < cdate(year(currentdate),1,1)
and
{table.customer = {?MyCustomer}
)

Probably off a bit, hopefully you can adjust it accordingly.

-k
 
Well, I really hadn't thought about it always being current year so anything to make it simpler would be appreciated.

Turkbear:
I want all customers in current and only the 1 specific customer is the month of december.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top