Info7 - need a formula for Year (ytd and last full)
Info7 - need a formula for Year (ytd and last full)
(OP)
Hello
I am cross-tabbing and charting sales by product group for current year to date and last full year.
The datetime field I am calculating from is called Sales_Order.so_processing_date.
What should the formula be?
Presumably once I return the data set I can crosstab and chart by year......
I am cross-tabbing and charting sales by product group for current year to date and last full year.
The datetime field I am calculating from is called Sales_Order.so_processing_date.
What should the formula be?
Presumably once I return the data set I can crosstab and chart by year......
RE: Info7 - need a formula for Year (ytd and last full)
Try posting technical information:
Crystal version
Database/connectivity used
Example data
Expected output
For the record selection try:
Report->Record selection->Record
(
Sales_Order.so_processing_date >= cdate(year(currentdate)-1,1,1)
and
Sales_Order.so_processing_date <= maximum(yeartodate)
)
-k
RE: Info7 - need a formula for Year (ytd and last full)
Version = Info 7
Connecting to SQL based datawarehouse
Sample data/ Result:
Item 2004 2003
Pens $100 $5000
Pencils $50 $1000
etc
So at the end of January 2005 the column headings for the Years will be 2005 and 2004.
In other words I want to show the customer what he bought last yaer and what his cumulative purchases are for this year
I can do everything except restrict the date of sale to last full year and ytd - unfortunately I'm getting errors using your suggested formula...
({Sales_Order.so_processing_date} >= cdate(year(currentdate)-1,1,1)
and
{Sales_Order.so_processing_date} <= maximum(yeartodate))
usually the 'A number, currency amount, boolean or string is expected here' type error
RE: Info7 - need a formula for Year (ytd and last full)
Where did you place the formula?
That's a VERY old version of Crystal, another important reason to post your software and database version to minimize the amount of time it takes to help you. It may be that it doesn't support the functions used, so try:
({Sales_Order.so_processing_date} >= cdate(year(currentdate)-1,1,1)
and
{Sales_Order.so_processing_date} <= currentdate
Simpler anyway, I sometimes over think these things and forget the obvious.
-k