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

Showing YTD for previous years

Status
Not open for further replies.

redbunny78

Programmer
Sep 26, 2007
29
US
Using Crystal X and Oracle

I have a report that shows YTD numbers based on a DateTime field. I also need to show the YTD numbers for last year and for this month last year.

The output would look like:

2007 YTD /Success Rate 1160595/96%
2006 Oct /Success Rate 1440179/95%
2006 /Success Rate 1717963/95%

What formula would I use show those numbers for last year?

Thanks!
 
Try something like:

//{@YTD} through last full month which it appears you are looking for:
if {table.date} in date(year(currentdate)-1,1,1) to
dateserial(year(currentdate)-1,month(currentdate), 1)-1 then
{table.qty}

//{@lastfullmolastyear:
if {table.date} in dateserial(year(currentdate)-1,month(currentdate)-1,1) to
dateserial(year(currentdate)-1,month(currentdate), 1)-1 then
{table.qty}

Place these in the detail section and then use summaries of these for your calculations.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top