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

Reporting previous month's data on a reaccuring basis

Status
Not open for further replies.

cruzer1

IS-IT--Management
Feb 13, 2004
6
0
0
US
Greetings,

I am using Crystal 9 and Crystal Enterprise.

There's a report I've set up to prompt for begin and end date to obtain info for the previous month.

This is fine if doing it manually, but I'd like to set it for automatic output to recipients using Crystal Enterprise.

Is there a formula, etc that I can use so that once it runs it pulls data from the previous month regardless of days in the month i.e. February 1-28? I'll be running it on the 1st of each month.

Thanks very much and I appreciate anyone's assistance with this.

Cruzer
 
Create a default date for the parameter of 1/1/1970

You didn't mention whether you're using a range type of parameter, so I'll assume so and use that means in the example, in the future post specifics.

The record selection formula would then have:

(
if minimum({?MyParm}) <> cdate(1970,1,1) then
{table.date} in {?MyParm}
else
if minimum({?MyParm}) = cdate(1970,1,1) then
{table.date} in Lastfullmonth
)

-k
 
If you want to eliminate the parameter, then you could just use:

{table.date} in lastfullmonth

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top