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!

Selecting date in last quater

Status
Not open for further replies.

kwirky

MIS
Apr 22, 2010
85
AU
Hi,
I need to schedule a report to run automatically through Crystal Server and as such I need to remove the date parameters so that they are automatically generated when the report is run.
I need to run the report at the begining of each quarter for the previous quarter. So at the begining of October, I am running data for 1/7/2010-30/9/2010. At the begining of January 2010, I will run data for 1/10/2010-31/12/2010, and so on.
This is to be done according to Australia financial year of July 2010 - June 2011. So therefore quarter 1 would be 1/7-30/9.
Your help would be greatly appreciated.
 
Hi,

In your record selection formula you need something like:
{table.date} >= dateadd(-3, currentdate)
The report will run on the first day of the month following the quarter. You have to set up the calendar accordingly.

Dana
 
Thanks for that. It works perfectly.

One more question, if I may. I would like to show the period from and to on the report. How do I create a formula to show this?
 
Hi,

Write two formulas:

@FromDate: dateadd('m', -3, currentdate)
@ToDate: currentdate

Add a textbox to the page header, and insert:
'Report shows data from @FromDate to @ToDate'

Format @FromDate and @ToDate as desired.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top