Crystal Reports XI Tips n Tricks
This blog relates to Business Objects XI and Crystal Reports XI. "This blog is provided 'AS IS' with no warranties, and confers no rights."
Tuesday 30 October 2012
Friday 6 January 2012
Last Month End Formula
The formula below will return the last month end date in a formula that you create in a crystal report.
It is very handy as it is dynamic so will save a lot of time.
NumberVar Days:= 1;
NumberVar Month1:= if month(currentdate) = 1 then 12 else month(currentdate)-1;
NumberVar Year1:= if month(currentdate)=1 then year(currentdate)-1 else year(currentdate);
date(year1,month1,days)
It is very handy as it is dynamic so will save a lot of time.
NumberVar Days:= 1;
NumberVar Month1:= if month(currentdate) = 1 then 12 else month(currentdate)-1;
NumberVar Year1:= if month(currentdate)=1 then year(currentdate)-1 else year(currentdate);
date(year1,month1,days)
Subscribe to:
Posts (Atom)