Link to home
Start Free TrialLog in
Avatar of nobile00
nobile00

asked on

Display Dates Last Full Month Crystal Reports

Hi

I have a report that needs to be run for the Last Full Month. Is there a way to display the date range on the report using Last Full Month? or is there another way to do this?

Example I run the report with Last full Month I want to display on the report:

3/1/11-3/31/31

Any help greatly appreciated.
Avatar of Mike McCracken
Mike McCracken

Crystal has a LastFullMonth function.

Just use something like this in the record selection

{YourDateField} IN LastFullMonth

mlmcc
Avatar of nobile00

ASKER

I am using the LastFullMonth function in Crystal.  The date field in modified_on: DateTime.

Is there a way to display either the dates or the month and year which is contained in the lastfullmonth?

Like display on the report March 2011 or 3/1/11 to 3/31/11?
Try this

CStr(Minimum(LastFullMonth,"m/d/yy") & " to " & Maximum(LastFullMonth,"m/d/yy")

To get the other

CStr(Minimum(LastFullMonth,"MMMM yyyy")

mlmcc
I put the formulas in the report but Crystal is indicating that both are missing a ) try to put in a few places and still get it's missing.
CStr(Minimum(LastFullMonth),"m/d/yy") & " to " & CStr(Maximum(LastFullMonth),"m/d/yy")

CStr(Minimum(LastFullMonth),"MMMM yyyy")


Sorry about that.

mlmcc
Thanks I tried the
CStr(Minimum(LastFullMonth),"m/d/yy") & " to " & CStr(Maximum(LastFullMonth),"m/d/yy")

and it is not returning the month just returning M
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for you help!  The formula is working fine.