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!

Crystal Reports 2008- fixed date to start a range. 1

Status
Not open for further replies.

MJV8198

Technical User
Oct 25, 2012
35
US
First thanks in advance for the help, I am a low level technical users designing a few reports.

I have a report that I would like to schedule run Monthly using a date range. and i am having problems figuring out the formula.

The date range starts on 07/01 and ends on the date the report is run.

So if I run the report on 10/26/2012 it should include records dated 07/01/2012 - 10/26/2012

If i run the report on 06/30/2013 it should include all dates from 07/01/2012 - 06/30/2013

This report will be scheduled to run at the end of every month


I hope I have supplied enough information
 
If your range will ALWAYS begin with 7/1/2012 and go until the moment it's run, I'd think you could just filter on anything older than that date.

{YOUR_TABLE.YOUR_DATE_FIELD} >= DateTime (2012, 07, 01, 00, 00, 00)

Or am I missing something?

-TS
 
Sorry each year when you reach 07/01/current year the starting point resets so on 08/01/2013 the date range needs to be 07/01/2013 - 08-01/2013
 
Try this:

Code:
(
Month(CurrentDate) in [1 to 6] and
{YOUR_TABLE.YOUR_DATE_FIELD} >= Date(Year(CurrentDate)-1, 7, 1)
) or
{YOUR_TABLE.YOUR_DATE_FIELD} >= Date(Year(CurrentDate), 7, 1)


Cheers
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top