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

First day of the month that previous to lastfullmonth 1

Status
Not open for further replies.

Corres

Technical User
Jun 13, 2006
87
CA
CRXI

I need to remove parameters {?Year},{?Month} from the report and use lastfullmonth function to run and distribute report in InfoView.

I have the following selection formula in one of subreports which displays data for selected month plus the previous month (2 month range):

{INCIDENT.INC_RESOLVE_ACT} in {@Last Period Start Date} to Date ({?Year},{?Month},{@Last Day})

{@Last Period Start Date} is a first day of the month that previous to the selected month
{@Last Day} is the last day of the selected month

I tried to change it:
{INCIDENT.INC_RESOLVE_ACT} in {@Last Period Start Date} to maximum(lastfullmonth)
but I do not know how to catch the first day of the month that previous to lastfullmonth.

Please give me idea how to accomplish this? Thank you!
 
Try:

Code:
DateSerial(Year(CurrentDate), Month(CurrentDate)-2, 1)

When run in July, it returns 1 May. Is that what you are looking for?

Cheers
Pete
 
Thanks Pete for your time! I believe it should work. I will let you know tomorrow! Cheers,
 
Thanks once again Pete, it works well. I have used it to modify other formulas as well.

Cheers!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top