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!

CR XI - Date Range in Report Expert 1

Status
Not open for further replies.

CRXIuser2005

Programmer
Sep 23, 2005
135
US
How would I be able to have a report AUTOMATICALLY run a date range as follows:

I would like to tell my report to always print detail for the last 3 months. So, using today as an example (10/26/05), I would like for my report to automatically calculate that it would need to run for the months of 08/01/05-10/26/05.

10/26/05 being the CURRENTDATE.

Can you tell me what formula to use to accomplish this?


Thank you.

MV

"A man is only as happy, as he makes up his mind to be....
 
Do you want "the first of the month from 3 months ago" through today, i.e. "08/01/05-10/26/05". OR "detail for the last 3 months" i.e. 07/26/05 - 10/26/05

DataDog
'Failure Is Not An Option'
 
I have need it from the "1st" of the prevous month.

08/01/05 - 10/26/05

This would be true for ALL days in Oct. Then startin with 11/01/05 then reporting dates should be 09/01/05 - 11/01/05, then daily.....11/02/05, then 11/03/05..{currentdate}...etc..etc...

Thank you.

MV

"A man is only as happy, as he makes up his mind to be....
 
In your select expert:

date ({YourDatafield})>=((year(Currentdate),Month(currentdate)-3),1 )and date({YourDatafield})<= currentdate

DataDog
'Failure Is Not An Option'
 
Can't get it to accept it, it says its missing a ) and I cannot locate where...I've tried to fix

Thank you.

MV

"A man is only as happy, as he makes up his mind to be....
 
I think datadog meant:

date ({YourDatafield})>=date(year(Currentdate),Month(currentdate)-2,1) and
date({YourDatafield})<= currentdate

Note that I think it should be -2, not -3.

-LB
 
Thank You for catching my pilot error yesterday lbass!
I was just going waaaaay toooooo fast!
You get a Star for being so observant

DataDog
'Failure Is Not An Option'
 
Thanks to both of you. Nice...

Thank you.

MV

"A man is only as happy, as he makes up his mind to be....
 
Sorry LB, my mistake... I must have gotten confused thinking they are the same thread.

I'll try and keep a better eye on this so as not to flood the board.

for now, I think I'm ok....on this one.

Thank you.

MV

"A man is only as happy, as he makes up his mind to be....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top