wysiwygGER01
Programmer
Hi,
I'm new to Crystal and am currently trying to alter a report to show me purchase order totals for the previous 2 months.
I have a test solution for month to date (February) and January but because it then goes back to 2009 my formula doesn't work.
My record selection formular goes like this for the current month:
month({@PO Date})=month(currentdate) and
year({@PO Date})=year(currentdate)
I've created a subreport each for the 2 previous months. January would look like this:
month({@PO Date})=(month(currentdate))-1 and
year({@PO Date})=year(currentdate)
For December 2009 I've tried this:
month({@PO Date})=(month(currentdate))-2 and
year({@PO Date})=(year(currentdate))-1
But this doesn't seem to work.
Obviously this solution is far away from being perfect as it is static. Would there maybe a built in function i could use?
I'm new to Crystal and am currently trying to alter a report to show me purchase order totals for the previous 2 months.
I have a test solution for month to date (February) and January but because it then goes back to 2009 my formula doesn't work.
My record selection formular goes like this for the current month:
month({@PO Date})=month(currentdate) and
year({@PO Date})=year(currentdate)
I've created a subreport each for the 2 previous months. January would look like this:
month({@PO Date})=(month(currentdate))-1 and
year({@PO Date})=year(currentdate)
For December 2009 I've tried this:
month({@PO Date})=(month(currentdate))-2 and
year({@PO Date})=(year(currentdate))-1
But this doesn't seem to work.
Obviously this solution is far away from being perfect as it is static. Would there maybe a built in function i could use?